From da427577b9ac5455b8a758b42b4926087d53d385 Mon Sep 17 00:00:00 2001 From: Microsoft Graph DevX Tooling Date: Tue, 28 May 2024 11:22:30 +0000 Subject: [PATCH] Update generated files with build 150887 --- .../generated/base_graph_service_client.py | 10 + .../item/messages/messages_request_builder.py | 6 +- .../device_app_management_request_builder.py | 4 +- .../managed_app_policies_request_builder.py | 8 +- ...d_app_registration_item_request_builder.py | 8 +- .../assignments_request_builder.py | 14 +- ..._e_book_assignment_item_request_builder.py | 14 +- .../managed_e_book_item_request_builder.py | 8 +- ..._app_configuration_item_request_builder.py | 8 +- ...bile_app_configurations_request_builder.py | 8 +- .../item/mobile_app_item_request_builder.py | 20 +- .../mobile_apps_request_builder.py | 14 +- ...ice_compliance_policies_request_builder.py | 14 +- ..._compliance_policy_item_request_builder.py | 20 +- .../device_configurations_request_builder.py | 14 +- ...vice_configuration_item_request_builder.py | 20 +- ...rollment_configurations_request_builder.py | 14 +- ...ment_configuration_item_request_builder.py | 20 +- .../device_management_request_builder.py | 4 +- .../role_definition_item_request_builder.py | 8 +- .../role_definitions_request_builder.py | 8 +- .../retention_label_request_builder.py | 6 +- .../names/item/range/range_request_builder.py | 6 +- .../names/item/range/range_request_builder.py | 6 +- .../assignments_request_builder.py | 4 +- .../item/publish/publish_request_builder.py | 4 +- .../item/publish/publish_request_builder.py | 4 +- .../item/publish/publish_request_builder.py | 4 +- .../conversations_request_builder.py | 6 +- .../item/conversation_item_request_builder.py | 10 +- ...onversation_thread_item_request_builder.py | 10 +- .../item/posts/posts_request_builder.py | 8 +- ...entication_events_flows_request_builder.py | 219 + .../count/count_request_builder.py | 103 + .../count/count_request_builder.py | 103 + ...ice_sign_up_events_flow_request_builder.py | 146 + ...cation_events_flow_item_request_builder.py | 210 + .../applications_request_builder.py | 32 + .../count/count_request_builder.py | 103 + .../include_applications_request_builder.py | 207 + ...on_application_app_item_request_builder.py | 187 + .../conditions/conditions_request_builder.py | 116 + .../applications_request_builder.py | 32 + .../count/count_request_builder.py | 103 + .../include_applications_request_builder.py | 207 + ...on_application_app_item_request_builder.py | 187 + .../conditions/conditions_request_builder.py | 116 + ...ice_sign_up_events_flow_request_builder.py | 136 + .../attributes/attributes_request_builder.py | 172 + .../attributes/count/count_request_builder.py | 103 + ...ser_flow_attribute_item_request_builder.py | 32 + .../item/ref/ref_request_builder.py | 77 + .../attributes/ref/ref_request_builder.py | 229 + ...rs_self_service_sign_up_request_builder.py | 87 + ...on_attribute_collection_request_builder.py | 116 + ...rs_self_service_sign_up_request_builder.py | 87 + .../count/count_request_builder.py | 103 + .../identity_providers_request_builder.py | 172 + ...tity_provider_base_item_request_builder.py | 32 + .../item/ref/ref_request_builder.py | 77 + .../ref/ref_request_builder.py | 229 + ...ation_method_load_start_request_builder.py | 116 + .../named_location_item_request_builder.py | 20 +- .../identity/identity_request_builder.py | 10 + .../access_package_item_request_builder.py | 8 +- .../assignment/assignment_request_builder.py | 6 +- ..._callout_extension_item_request_builder.py | 20 +- msgraph/generated/kiota-lock.json | 2 +- .../models/access_package_assignment.py | 2 +- .../access_package_assignment_request.py | 4 +- .../models/access_package_resource.py | 2 +- .../models/access_package_resource_request.py | 2 +- .../models/access_package_resource_role.py | 4 +- .../access_review_instance_decision_item.py | 2 +- msgraph/generated/models/authentication.py | 4 +- ...ttribute_collection_input_configuration.py | 99 + ...ication_attribute_collection_input_type.py | 9 + ...tribute_collection_option_configuration.py | 57 + ...uthentication_attribute_collection_page.py | 60 + ...bute_collection_page_view_configuration.py | 68 + ...ndition_application_collection_response.py | 57 + .../models/authentication_event_listener.py | 28 + .../models/authentication_events_flow.py | 78 + ...ication_events_flow_collection_response.py | 57 + .../generated/models/content_customization.py | 4 +- msgraph/generated/models/dictionary.py | 7 + msgraph/generated/models/entity.py | 56 + ..._users_self_service_sign_up_events_flow.py | 80 + ...sign_up_events_flow_collection_response.py | 57 + msgraph/generated/models/file_storage.py | 59 + .../models/file_storage_container.py | 105 + ...e_storage_container_collection_response.py | 57 + ...ge_container_custom_property_dictionary.py | 52 + .../models/file_storage_container_status.py | 7 + .../file_storage_container_viewpoint.py | 53 + .../generated/models/identity_container.py | 7 + .../models/identity_user_flow_attribute.py | 2 +- ...ion_external_users_self_service_sign_up.py | 66 + .../models/on_attribute_collection_handler.py | 64 + .../on_attribute_collection_listener.py | 59 + ...art_external_users_self_service_sign_up.py | 59 + ...uthentication_method_load_start_handler.py | 64 + ...thentication_method_load_start_listener.py | 59 + ...art_external_users_self_service_sign_up.py | 56 + .../on_interactive_auth_flow_start_handler.py | 64 + ...on_interactive_auth_flow_start_listener.py | 59 + ...art_external_users_self_service_sign_up.py | 59 + .../models/on_user_create_start_handler.py | 64 + .../models/on_user_create_start_listener.py | 59 + .../organizational_branding_properties.py | 4 +- msgraph/generated/models/sign_in_activity.py | 12 +- .../generated/models/site_archival_details.py | 60 + .../generated/models/site_archive_status.py | 8 + msgraph/generated/models/site_collection.py | 7 + msgraph/generated/models/storage.py | 60 + msgraph/generated/models/user_type.py | 7 + .../background_image_request_builder.py | 12 +- .../background_image_request_builder.py | 12 +- .../banner_logo_request_builder.py | 6 +- .../item/organization_item_request_builder.py | 8 +- ...dentity_synchronization_request_builder.py | 6 +- ...urity_run_hunting_query_request_builder.py | 4 +- .../generated/sites/sites_request_builder.py | 8 +- .../containers/containers_request_builder.py | 209 + .../containers/count/count_request_builder.py | 103 + .../item/activate/activate_request_builder.py | 77 + .../drive/bundles/bundles_request_builder.py | 207 + .../bundles/count/count_request_builder.py | 103 + .../item/content/content_request_builder.py | 180 + .../item/drive_item_item_request_builder.py | 116 + .../created_by_user_request_builder.py | 126 + .../mailbox_settings_request_builder.py | 151 + .../count/count_request_builder.py | 103 + ...ice_provisioning_errors_request_builder.py | 146 + .../item/drive/drive_request_builder.py | 300 ++ .../following/count/count_request_builder.py | 103 + .../following/following_request_builder.py | 161 + .../item/content/content_request_builder.py | 180 + .../item/drive_item_item_request_builder.py | 116 + .../items/count/count_request_builder.py | 103 + .../all_time/all_time_request_builder.py | 106 + .../analytics/analytics_request_builder.py | 217 + .../count/count_request_builder.py | 103 + .../activities/activities_request_builder.py | 207 + .../activities/count/count_request_builder.py | 103 + .../content/content_request_builder.py | 180 + .../drive_item/drive_item_request_builder.py | 116 + .../item_activity_item_request_builder.py | 197 + ...item_activity_stat_item_request_builder.py | 197 + .../item_activity_stats_request_builder.py | 207 + .../last_seven_days_request_builder.py | 106 + ...ign_sensitivity_label_post_request_body.py | 64 + ...ssign_sensitivity_label_request_builder.py | 85 + .../item/checkin/checkin_post_request_body.py | 53 + .../item/checkin/checkin_request_builder.py | 86 + .../item/checkout/checkout_request_builder.py | 78 + .../item/children/children_request_builder.py | 207 + .../children/count/count_request_builder.py | 103 + .../item/content/content_request_builder.py | 180 + .../item/drive_item_item_request_builder.py | 116 + .../item/content/content_request_builder.py | 180 + .../items/item/copy/copy_post_request_body.py | 60 + .../items/item/copy/copy_request_builder.py | 89 + .../create_link_post_request_body.py | 85 + .../create_link_request_builder.py | 89 + ...create_upload_session_post_request_body.py | 56 + .../create_upload_session_request_builder.py | 88 + .../created_by_user_request_builder.py | 126 + .../mailbox_settings_request_builder.py | 151 + .../count/count_request_builder.py | 103 + ...ice_provisioning_errors_request_builder.py | 146 + .../items/item/delta/delta_get_response.py | 57 + .../items/item/delta/delta_request_builder.py | 137 + .../delta_with_token_get_response.py | 57 + .../delta_with_token_request_builder.py | 139 + .../item/drive_item_item_request_builder.py | 512 +++ ...ract_sensitivity_labels_request_builder.py | 80 + .../item/follow/follow_request_builder.py | 81 + ...get_activities_by_interval_get_response.py | 57 + ..._activities_by_interval_request_builder.py | 137 + ...nd_date_time_with_interval_get_response.py | 57 + ...date_time_with_interval_request_builder.py | 143 + .../item/invite/invite_post_request_body.py | 84 + .../items/item/invite/invite_post_response.py | 57 + .../item/invite/invite_request_builder.py | 89 + .../last_modified_by_user_request_builder.py | 126 + .../mailbox_settings_request_builder.py | 151 + .../count/count_request_builder.py | 103 + ...ice_provisioning_errors_request_builder.py | 146 + .../list_item/list_item_request_builder.py | 106 + .../permanent_delete_request_builder.py | 77 + .../count/count_request_builder.py | 103 + .../item/grant/grant_post_request_body.py | 60 + .../item/grant/grant_post_response.py | 57 + .../item/grant/grant_request_builder.py | 89 + .../item/permission_item_request_builder.py | 197 + .../permissions_request_builder.py | 207 + .../item/preview/preview_post_request_body.py | 53 + .../item/preview/preview_request_builder.py | 88 + .../item/restore/restore_post_request_body.py | 60 + .../item/restore/restore_request_builder.py | 89 + .../retention_label_request_builder.py | 187 + .../search_with_q_get_response.py | 57 + .../search_with_q_request_builder.py | 140 + .../count/count_request_builder.py | 103 + .../reauthorize_request_builder.py | 78 + .../item/subscription_item_request_builder.py | 197 + .../subscriptions_request_builder.py | 207 + .../thumbnails/count/count_request_builder.py | 103 + .../thumbnail_set_item_request_builder.py | 187 + .../thumbnails/thumbnails_request_builder.py | 207 + .../item/unfollow/unfollow_request_builder.py | 78 + .../validate_permission_post_request_body.py | 53 + .../validate_permission_request_builder.py | 85 + .../versions/count/count_request_builder.py | 103 + .../item/content/content_request_builder.py | 159 + ...drive_item_version_item_request_builder.py | 207 + .../restore_version_request_builder.py | 78 + .../item/versions/versions_request_builder.py | 207 + .../application_request_builder.py | 197 + .../calculate/calculate_post_request_body.py | 49 + .../calculate/calculate_request_builder.py | 86 + .../close_session_request_builder.py | 78 + .../comments/comments_request_builder.py | 207 + .../comments/count/count_request_builder.py | 103 + .../replies/count/count_request_builder.py | 103 + ...book_comment_reply_item_request_builder.py | 187 + .../item/replies/replies_request_builder.py | 207 + .../workbook_comment_item_request_builder.py | 197 + .../create_session_post_request_body.py | 49 + .../create_session_request_builder.py | 89 + .../functions/abs/abs_post_request_body.py | 56 + .../functions/abs/abs_request_builder.py | 88 + .../accr_int/accr_int_post_request_body.py | 84 + .../accr_int/accr_int_request_builder.py | 88 + .../accr_int_m_post_request_body.py | 72 + .../accr_int_m/accr_int_m_request_builder.py | 88 + .../functions/acos/acos_post_request_body.py | 56 + .../functions/acos/acos_request_builder.py | 88 + .../acosh/acosh_post_request_body.py | 56 + .../functions/acosh/acosh_request_builder.py | 88 + .../functions/acot/acot_post_request_body.py | 56 + .../functions/acot/acot_request_builder.py | 88 + .../acoth/acoth_post_request_body.py | 56 + .../functions/acoth/acoth_request_builder.py | 88 + .../amor_degrc_post_request_body.py | 80 + .../amor_degrc/amor_degrc_request_builder.py | 88 + .../amor_linc/amor_linc_post_request_body.py | 80 + .../amor_linc/amor_linc_request_builder.py | 88 + .../functions/and_/and_post_request_body.py | 56 + .../functions/and_/and_request_builder.py | 88 + .../arabic/arabic_post_request_body.py | 56 + .../arabic/arabic_request_builder.py | 88 + .../areas/areas_post_request_body.py | 56 + .../functions/areas/areas_request_builder.py | 88 + .../functions/asc/asc_post_request_body.py | 56 + .../functions/asc/asc_request_builder.py | 88 + .../functions/asin/asin_post_request_body.py | 56 + .../functions/asin/asin_request_builder.py | 88 + .../asinh/asinh_post_request_body.py | 56 + .../functions/asinh/asinh_request_builder.py | 88 + .../functions/atan/atan_post_request_body.py | 56 + .../functions/atan/atan_request_builder.py | 88 + .../atan2/atan2_post_request_body.py | 60 + .../functions/atan2/atan2_request_builder.py | 88 + .../atanh/atanh_post_request_body.py | 56 + .../functions/atanh/atanh_request_builder.py | 88 + .../ave_dev/ave_dev_post_request_body.py | 56 + .../ave_dev/ave_dev_request_builder.py | 88 + .../average/average_post_request_body.py | 56 + .../average/average_request_builder.py | 88 + .../average_a/average_a_post_request_body.py | 56 + .../average_a/average_a_request_builder.py | 88 + .../average_if_post_request_body.py | 64 + .../average_if/average_if_request_builder.py | 88 + .../average_ifs_post_request_body.py | 60 + .../average_ifs_request_builder.py | 88 + .../baht_text/baht_text_post_request_body.py | 56 + .../baht_text/baht_text_request_builder.py | 88 + .../functions/base/base_post_request_body.py | 64 + .../functions/base/base_request_builder_.py | 88 + .../bessel_i/bessel_i_post_request_body.py | 60 + .../bessel_i/bessel_i_request_builder.py | 88 + .../bessel_j/bessel_j_post_request_body.py | 60 + .../bessel_j/bessel_j_request_builder.py | 88 + .../bessel_k/bessel_k_post_request_body.py | 60 + .../bessel_k/bessel_k_request_builder.py | 88 + .../bessel_y/bessel_y_post_request_body.py | 60 + .../bessel_y/bessel_y_request_builder.py | 88 + .../beta_dist/beta_dist_post_request_body.py | 76 + .../beta_dist/beta_dist_request_builder.py | 88 + .../beta_inv/beta_inv_post_request_body.py | 72 + .../beta_inv/beta_inv_request_builder.py | 88 + .../bin2_dec/bin2_dec_post_request_body.py | 56 + .../bin2_dec/bin2_dec_request_builder.py | 88 + .../bin2_hex/bin2_hex_post_request_body.py | 60 + .../bin2_hex/bin2_hex_request_builder.py | 88 + .../bin2_oct/bin2_oct_post_request_body.py | 60 + .../bin2_oct/bin2_oct_request_builder.py | 88 + .../binom_dist_post_request_body.py | 68 + .../binom_dist/binom_dist_request_builder.py | 88 + .../binom_dist_range_post_request_body.py | 68 + .../binom_dist_range_request_builder.py | 88 + .../binom_inv/binom_inv_post_request_body.py | 64 + .../binom_inv/binom_inv_request_builder.py | 88 + .../bitand/bitand_post_request_body.py | 60 + .../bitand/bitand_request_builder.py | 88 + .../bitlshift/bitlshift_post_request_body.py | 60 + .../bitlshift/bitlshift_request_builder.py | 88 + .../bitor/bitor_post_request_body.py | 60 + .../functions/bitor/bitor_request_builder.py | 88 + .../bitrshift/bitrshift_post_request_body.py | 60 + .../bitrshift/bitrshift_request_builder.py | 88 + .../bitxor/bitxor_post_request_body.py | 60 + .../bitxor/bitxor_request_builder.py | 88 + .../ceiling_math_post_request_body.py | 64 + .../ceiling_math_request_builder.py | 88 + .../ceiling_precise_post_request_body.py | 60 + .../ceiling_precise_request_builder.py | 88 + .../functions/char/char_post_request_body.py | 56 + .../functions/char/char_request_builder.py | 88 + .../chi_sq_dist_post_request_body.py | 64 + .../chi_sq_dist_request_builder.py | 88 + .../chi_sq_dist_r_t_post_request_body.py | 60 + .../chi_sq_dist_r_t_request_builder.py | 88 + .../chi_sq_inv_post_request_body.py | 60 + .../chi_sq_inv/chi_sq_inv_request_builder.py | 88 + .../chi_sq_inv_r_t_post_request_body.py | 60 + .../chi_sq_inv_r_t_request_builder.py | 88 + .../choose/choose_post_request_body.py | 60 + .../choose/choose_request_builder.py | 88 + .../clean/clean_post_request_body.py | 56 + .../functions/clean/clean_request_builder.py | 88 + .../functions/code/code_post_request_body.py | 56 + .../functions/code/code_request_builder.py | 88 + .../columns/columns_post_request_body.py | 56 + .../columns/columns_request_builder.py | 88 + .../combin/combin_post_request_body.py | 60 + .../combin/combin_request_builder.py | 88 + .../combina/combina_post_request_body.py | 60 + .../combina/combina_request_builder.py | 88 + .../complex/complex_post_request_body.py | 64 + .../complex/complex_request_builder.py | 88 + .../concatenate_post_request_body.py | 56 + .../concatenate_request_builder.py | 88 + .../confidence_norm_post_request_body.py | 64 + .../confidence_norm_request_builder.py | 88 + .../confidence_t_post_request_body.py | 64 + .../confidence_t_request_builder.py | 88 + .../convert/convert_post_request_body.py | 64 + .../convert/convert_request_builder.py | 88 + .../functions/cos/cos_post_request_body.py | 56 + .../functions/cos/cos_request_builder.py | 88 + .../functions/cosh/cosh_post_request_body.py | 56 + .../functions/cosh/cosh_request_builder.py | 88 + .../functions/cot/cot_post_request_body.py | 56 + .../functions/cot/cot_request_builder.py | 88 + .../functions/coth/coth_post_request_body.py | 56 + .../functions/coth/coth_request_builder.py | 88 + .../count/count_post_request_body.py | 56 + .../functions/count/count_request_builder.py | 88 + .../count_a/count_a_post_request_body.py | 56 + .../count_a/count_a_request_builder.py | 88 + .../count_blank_post_request_body.py | 56 + .../count_blank_request_builder.py | 88 + .../count_if/count_if_post_request_body.py | 60 + .../count_if/count_if_request_builder.py | 88 + .../count_ifs/count_ifs_post_request_body.py | 56 + .../count_ifs/count_ifs_request_builder.py | 88 + .../coup_day_bs_post_request_body.py | 68 + .../coup_day_bs_request_builder.py | 88 + .../coup_days/coup_days_post_request_body.py | 68 + .../coup_days/coup_days_request_builder.py | 88 + .../coup_days_nc_post_request_body.py | 68 + .../coup_days_nc_request_builder.py | 88 + .../coup_ncd/coup_ncd_post_request_body.py | 68 + .../coup_ncd/coup_ncd_request_builder.py | 88 + .../coup_num/coup_num_post_request_body.py | 68 + .../coup_num/coup_num_request_builder.py | 88 + .../coup_pcd/coup_pcd_post_request_body.py | 68 + .../coup_pcd/coup_pcd_request_builder.py | 88 + .../functions/csc/csc_post_request_body.py | 56 + .../functions/csc/csc_request_builder.py | 88 + .../functions/csch/csch_post_request_body.py | 56 + .../functions/csch/csch_request_builder.py | 88 + .../cum_i_pmt/cum_i_pmt_post_request_body.py | 76 + .../cum_i_pmt/cum_i_pmt_request_builder.py | 88 + .../cum_princ/cum_princ_post_request_body.py | 76 + .../cum_princ/cum_princ_request_builder.py | 88 + .../functions/date/date_post_request_body.py | 64 + .../functions/date/date_request_builder.py | 88 + .../datevalue/datevalue_post_request_body.py | 56 + .../datevalue/datevalue_request_builder.py | 88 + .../daverage/daverage_post_request_body.py | 64 + .../daverage/daverage_request_builder.py | 88 + .../functions/day/day_post_request_body.py | 56 + .../functions/day/day_request_builder.py | 88 + .../functions/days/days_post_request_body.py | 60 + .../functions/days/days_request_builder.py | 88 + .../days360/days360_post_request_body.py | 64 + .../days360/days360_request_builder.py | 88 + .../functions/db/db_post_request_body.py | 72 + .../functions/db/db_request_builder.py | 88 + .../functions/dbcs/dbcs_post_request_body.py | 56 + .../functions/dbcs/dbcs_request_builder.py | 88 + .../dcount/dcount_post_request_body.py | 64 + .../dcount/dcount_request_builder.py | 88 + .../dcount_a/dcount_a_post_request_body.py | 64 + .../dcount_a/dcount_a_request_builder.py | 88 + .../functions/ddb/ddb_post_request_body.py | 72 + .../functions/ddb/ddb_request_builder.py | 88 + .../dec2_bin/dec2_bin_post_request_body.py | 60 + .../dec2_bin/dec2_bin_request_builder.py | 88 + .../dec2_hex/dec2_hex_post_request_body.py | 60 + .../dec2_hex/dec2_hex_request_builder.py | 88 + .../dec2_oct/dec2_oct_post_request_body.py | 60 + .../dec2_oct/dec2_oct_request_builder.py | 88 + .../decimal/decimal_post_request_body.py | 60 + .../decimal/decimal_request_builder.py | 88 + .../degrees/degrees_post_request_body.py | 56 + .../degrees/degrees_request_builder.py | 88 + .../delta/delta_post_request_body.py | 60 + .../functions/delta/delta_request_builder.py | 88 + .../dev_sq/dev_sq_post_request_body.py | 56 + .../dev_sq/dev_sq_request_builder.py | 88 + .../functions/dget/dget_post_request_body.py | 64 + .../functions/dget/dget_request_builder.py | 88 + .../functions/disc/disc_post_request_body.py | 72 + .../functions/disc/disc_request_builder.py | 88 + .../functions/dmax/dmax_post_request_body.py | 64 + .../functions/dmax/dmax_request_builder.py | 88 + .../functions/dmin/dmin_post_request_body.py | 64 + .../functions/dmin/dmin_request_builder.py | 88 + .../dollar/dollar_post_request_body.py | 60 + .../dollar/dollar_request_builder.py | 88 + .../dollar_de/dollar_de_post_request_body.py | 60 + .../dollar_de/dollar_de_request_builder.py | 88 + .../dollar_fr/dollar_fr_post_request_body.py | 60 + .../dollar_fr/dollar_fr_request_builder.py | 88 + .../dproduct/dproduct_post_request_body.py | 64 + .../dproduct/dproduct_request_builder.py | 88 + .../dst_dev/dst_dev_post_request_body.py | 64 + .../dst_dev/dst_dev_request_builder.py | 88 + .../dst_dev_p/dst_dev_p_post_request_body.py | 64 + .../dst_dev_p/dst_dev_p_request_builder.py | 88 + .../functions/dsum/dsum_post_request_body.py | 64 + .../functions/dsum/dsum_request_builder.py | 88 + .../duration/duration_post_request_body.py | 76 + .../duration/duration_request_builder.py | 88 + .../functions/dvar/dvar_post_request_body.py | 64 + .../functions/dvar/dvar_request_builder.py | 88 + .../dvar_p/dvar_p_post_request_body.py | 64 + .../dvar_p/dvar_p_request_builder.py | 88 + .../ecma_ceiling_post_request_body.py | 60 + .../ecma_ceiling_request_builder.py | 88 + .../edate/edate_post_request_body.py | 60 + .../functions/edate/edate_request_builder.py | 88 + .../effect/effect_post_request_body.py | 60 + .../effect/effect_request_builder.py | 88 + .../eo_month/eo_month_post_request_body.py | 60 + .../eo_month/eo_month_request_builder.py | 88 + .../functions/erf/erf_post_request_body.py | 60 + .../functions/erf/erf_request_builder.py | 88 + .../erf_c/erf_c_post_request_body.py | 56 + .../functions/erf_c/erf_c_request_builder.py | 88 + .../erf_c_precise_post_request_body.py | 56 + .../erf_c_precise_request_builder.py | 88 + .../erf_precise_post_request_body.py | 56 + .../erf_precise_request_builder.py | 88 + .../error_type_post_request_body.py | 56 + .../error_type/error_type_request_builder.py | 88 + .../functions/even/even_post_request_body.py | 56 + .../functions/even/even_request_builder.py | 88 + .../exact/exact_post_request_body.py | 60 + .../functions/exact/exact_request_builder.py | 88 + .../functions/exp/exp_post_request_body.py | 56 + .../functions/exp/exp_request_builder.py | 88 + .../expon_dist_post_request_body.py | 64 + .../expon_dist/expon_dist_request_builder.py | 88 + .../f_dist/f_dist_post_request_body.py | 68 + .../f_dist/f_dist_request_builder.py | 88 + .../f_dist_r_t_post_request_body.py | 64 + .../f_dist_r_t/f_dist_r_t_request_builder.py | 88 + .../f_inv/f_inv_post_request_body.py | 64 + .../functions/f_inv/f_inv_request_builder.py | 88 + .../f_inv_r_t/f_inv_r_t_post_request_body.py | 64 + .../f_inv_r_t/f_inv_r_t_request_builder.py | 88 + .../functions/fact/fact_post_request_body.py | 56 + .../functions/fact/fact_request_builder.py | 88 + .../fact_double_post_request_body.py | 56 + .../fact_double_request_builder.py | 88 + .../functions/false_/false_request_builder.py | 80 + .../functions/find/find_post_request_body.py | 64 + .../functions/find/find_request_builder.py | 88 + .../find_b/find_b_post_request_body.py | 64 + .../find_b/find_b_request_builder.py | 88 + .../fisher/fisher_post_request_body.py | 56 + .../fisher/fisher_request_builder.py | 88 + .../fisher_inv_post_request_body.py | 56 + .../fisher_inv/fisher_inv_request_builder.py | 88 + .../fixed/fixed_post_request_body.py | 64 + .../functions/fixed/fixed_request_builder.py | 88 + .../floor_math_post_request_body.py | 64 + .../floor_math/floor_math_request_builder.py | 88 + .../floor_precise_post_request_body.py | 60 + .../floor_precise_request_builder.py | 88 + .../functions/functions_request_builder.py | 3847 +++++++++++++++++ .../functions/fv/fv_post_request_body.py | 72 + .../functions/fv/fv_request_builder.py | 88 + .../fvschedule_post_request_body.py | 60 + .../fvschedule/fvschedule_request_builder.py | 88 + .../gamma/gamma_post_request_body.py | 56 + .../functions/gamma/gamma_request_builder.py | 88 + .../gamma_dist_post_request_body.py | 68 + .../gamma_dist/gamma_dist_request_builder.py | 88 + .../gamma_inv/gamma_inv_post_request_body.py | 64 + .../gamma_inv/gamma_inv_request_builder.py | 88 + .../gamma_ln/gamma_ln_post_request_body.py | 56 + .../gamma_ln/gamma_ln_request_builder.py | 88 + .../gamma_ln_precise_post_request_body.py | 56 + .../gamma_ln_precise_request_builder.py | 88 + .../gauss/gauss_post_request_body.py | 56 + .../functions/gauss/gauss_request_builder.py | 88 + .../functions/gcd/gcd_post_request_body.py | 56 + .../functions/gcd/gcd_request_builder.py | 88 + .../ge_step/ge_step_post_request_body.py | 60 + .../ge_step/ge_step_request_builder.py | 88 + .../geo_mean/geo_mean_post_request_body.py | 56 + .../geo_mean/geo_mean_request_builder.py | 88 + .../har_mean/har_mean_post_request_body.py | 56 + .../har_mean/har_mean_request_builder.py | 88 + .../hex2_bin/hex2_bin_post_request_body.py | 60 + .../hex2_bin/hex2_bin_request_builder.py | 88 + .../hex2_dec/hex2_dec_post_request_body.py | 56 + .../hex2_dec/hex2_dec_request_builder.py | 88 + .../hex2_oct/hex2_oct_post_request_body.py | 60 + .../hex2_oct/hex2_oct_request_builder.py | 88 + .../hlookup/hlookup_post_request_body.py | 68 + .../hlookup/hlookup_request_builder.py | 88 + .../functions/hour/hour_post_request_body.py | 56 + .../functions/hour/hour_request_builder.py | 88 + .../hyp_geom_dist_post_request_body.py | 72 + .../hyp_geom_dist_request_builder.py | 88 + .../hyperlink/hyperlink_post_request_body.py | 60 + .../hyperlink/hyperlink_request_builder.py | 88 + .../functions/if_/if_post_request_body.py | 64 + .../functions/if_/if_request_builder.py | 88 + .../im_abs/im_abs_post_request_body.py | 56 + .../im_abs/im_abs_request_builder.py | 88 + .../im_argument_post_request_body.py | 56 + .../im_argument_request_builder.py | 88 + .../im_conjugate_post_request_body.py | 56 + .../im_conjugate_request_builder.py | 88 + .../im_cos/im_cos_post_request_body.py | 56 + .../im_cos/im_cos_request_builder.py | 88 + .../im_cosh/im_cosh_post_request_body.py | 56 + .../im_cosh/im_cosh_request_builder.py | 88 + .../im_cot/im_cot_post_request_body.py | 56 + .../im_cot/im_cot_request_builder.py | 88 + .../im_csc/im_csc_post_request_body.py | 56 + .../im_csc/im_csc_request_builder.py | 88 + .../im_csch/im_csch_post_request_body.py | 56 + .../im_csch/im_csch_request_builder.py | 88 + .../im_div/im_div_post_request_body.py | 60 + .../im_div/im_div_request_builder.py | 88 + .../im_exp/im_exp_post_request_body.py | 56 + .../im_exp/im_exp_request_builder.py | 88 + .../im_ln/im_ln_post_request_body.py | 56 + .../functions/im_ln/im_ln_request_builder.py | 88 + .../im_log10/im_log10_post_request_body.py | 56 + .../im_log10/im_log10_request_builder.py | 88 + .../im_log2/im_log2_post_request_body.py | 56 + .../im_log2/im_log2_request_builder.py | 88 + .../im_power/im_power_post_request_body.py | 60 + .../im_power/im_power_request_builder.py | 88 + .../im_product_post_request_body.py | 56 + .../im_product/im_product_request_builder.py | 88 + .../im_real/im_real_post_request_body.py | 56 + .../im_real/im_real_request_builder.py | 88 + .../im_sec/im_sec_post_request_body.py | 56 + .../im_sec/im_sec_request_builder.py | 88 + .../im_sech/im_sech_post_request_body.py | 56 + .../im_sech/im_sech_request_builder.py | 88 + .../im_sin/im_sin_post_request_body.py | 56 + .../im_sin/im_sin_request_builder.py | 88 + .../im_sinh/im_sinh_post_request_body.py | 56 + .../im_sinh/im_sinh_request_builder.py | 88 + .../im_sqrt/im_sqrt_post_request_body.py | 56 + .../im_sqrt/im_sqrt_request_builder.py | 88 + .../im_sub/im_sub_post_request_body.py | 60 + .../im_sub/im_sub_request_builder.py | 88 + .../im_sum/im_sum_post_request_body.py | 56 + .../im_sum/im_sum_request_builder.py | 88 + .../im_tan/im_tan_post_request_body.py | 56 + .../im_tan/im_tan_request_builder.py | 88 + .../imaginary/imaginary_post_request_body.py | 56 + .../imaginary/imaginary_request_builder.py | 88 + .../functions/int/int_post_request_body.py | 56 + .../functions/int/int_request_builder.py | 88 + .../int_rate/int_rate_post_request_body.py | 72 + .../int_rate/int_rate_request_builder.py | 88 + .../functions/ipmt/ipmt_post_request_body.py | 76 + .../functions/ipmt/ipmt_request_builder.py | 88 + .../functions/irr/irr_post_request_body.py | 60 + .../functions/irr/irr_request_builder.py | 88 + .../is_err/is_err_post_request_body.py | 56 + .../is_err/is_err_request_builder.py | 88 + .../is_error/is_error_post_request_body.py | 56 + .../is_error/is_error_request_builder.py | 88 + .../is_even/is_even_post_request_body.py | 56 + .../is_even/is_even_request_builder.py | 88 + .../is_formula_post_request_body.py | 56 + .../is_formula/is_formula_request_builder.py | 88 + .../is_logical_post_request_body.py | 56 + .../is_logical/is_logical_request_builder.py | 88 + .../is_n_a/is_n_a_post_request_body.py | 56 + .../is_n_a/is_n_a_request_builder.py | 88 + .../is_non_text_post_request_body.py | 56 + .../is_non_text_request_builder.py | 88 + .../is_number/is_number_post_request_body.py | 56 + .../is_number/is_number_request_builder.py | 88 + .../is_odd/is_odd_post_request_body.py | 56 + .../is_odd/is_odd_request_builder.py | 88 + .../is_text/is_text_post_request_body.py | 56 + .../is_text/is_text_request_builder.py | 88 + .../iso_ceiling_post_request_body.py | 60 + .../iso_ceiling_request_builder.py | 88 + .../iso_week_num_post_request_body.py | 56 + .../iso_week_num_request_builder.py | 88 + .../ispmt/ispmt_post_request_body.py | 68 + .../functions/ispmt/ispmt_request_builder.py | 88 + .../isref/isref_post_request_body.py | 56 + .../functions/isref/isref_request_builder.py | 88 + .../functions/kurt/kurt_post_request_body.py | 56 + .../functions/kurt/kurt_request_builder.py | 88 + .../large/large_post_request_body.py | 60 + .../functions/large/large_request_builder.py | 88 + .../functions/lcm/lcm_post_request_body.py | 56 + .../functions/lcm/lcm_request_builder.py | 88 + .../functions/left/left_post_request_body.py | 60 + .../functions/left/left_request_builder.py | 88 + .../leftb/leftb_post_request_body.py | 60 + .../functions/leftb/leftb_request_builder.py | 88 + .../functions/len/len_post_request_body.py | 56 + .../functions/len/len_request_builder.py | 88 + .../functions/lenb/lenb_post_request_body.py | 56 + .../functions/lenb/lenb_request_builder.py | 88 + .../functions/ln/ln_post_request_body.py | 56 + .../functions/ln/ln_request_builder.py | 88 + .../functions/log/log_post_request_body.py | 60 + .../functions/log/log_request_builder.py | 88 + .../log10/log10_post_request_body.py | 56 + .../functions/log10/log10_request_builder.py | 88 + .../log_norm_dist_post_request_body.py | 68 + .../log_norm_dist_request_builder.py | 88 + .../log_norm_inv_post_request_body.py | 64 + .../log_norm_inv_request_builder.py | 88 + .../lookup/lookup_post_request_body.py | 64 + .../lookup/lookup_request_builder.py | 88 + .../lower/lower_post_request_body.py | 56 + .../functions/lower/lower_request_builder.py | 88 + .../match/match_post_request_body.py | 64 + .../functions/match/match_request_builder.py | 88 + .../functions/max/max_post_request_body.py | 56 + .../functions/max/max_request_builder.py | 88 + .../max_a/max_a_post_request_body.py | 56 + .../functions/max_a/max_a_request_builder.py | 88 + .../mduration/mduration_post_request_body.py | 76 + .../mduration/mduration_request_builder.py | 88 + .../median/median_post_request_body.py | 56 + .../median/median_request_builder.py | 88 + .../functions/mid/mid_post_request_body.py | 64 + .../functions/mid/mid_request_builder.py | 88 + .../functions/midb/midb_post_request_body.py | 64 + .../functions/midb/midb_request_builder.py | 88 + .../functions/min/min_post_request_body.py | 56 + .../functions/min/min_request_builder.py | 88 + .../min_a/min_a_post_request_body.py | 56 + .../functions/min_a/min_a_request_builder.py | 88 + .../minute/minute_post_request_body.py | 56 + .../minute/minute_request_builder.py | 88 + .../functions/mirr/mirr_post_request_body.py | 64 + .../functions/mirr/mirr_request_builder.py | 88 + .../functions/mod/mod_post_request_body.py | 60 + .../functions/mod/mod_request_builder.py | 88 + .../month/month_post_request_body.py | 56 + .../functions/month/month_request_builder.py | 88 + .../mround/mround_post_request_body.py | 60 + .../mround/mround_request_builder.py | 88 + .../multi_nomial_post_request_body.py | 56 + .../multi_nomial_request_builder.py | 88 + .../functions/n/n_post_request_body.py | 56 + .../workbook/functions/n/n_request_builder.py | 88 + .../functions/na/na_request_builder.py | 80 + .../neg_binom_dist_post_request_body.py | 68 + .../neg_binom_dist_request_builder.py | 88 + .../network_days_post_request_body.py | 64 + .../network_days_request_builder.py | 88 + .../network_days_intl_post_request_body.py | 68 + .../network_days_intl_request_builder.py | 88 + .../nominal/nominal_post_request_body.py | 60 + .../nominal/nominal_request_builder.py | 88 + .../norm_dist/norm_dist_post_request_body.py | 68 + .../norm_dist/norm_dist_request_builder.py | 88 + .../norm_inv/norm_inv_post_request_body.py | 64 + .../norm_inv/norm_inv_request_builder.py | 88 + .../norm_s_dist_post_request_body.py | 60 + .../norm_s_dist_request_builder.py | 88 + .../norm_s_inv_post_request_body.py | 56 + .../norm_s_inv/norm_s_inv_request_builder.py | 88 + .../functions/not_/not_post_request_body.py | 56 + .../functions/not_/not_request_builder.py | 88 + .../functions/now/now_request_builder.py | 80 + .../functions/nper/nper_post_request_body.py | 72 + .../functions/nper/nper_request_builder.py | 88 + .../functions/npv/npv_post_request_body.py | 60 + .../functions/npv/npv_request_builder.py | 88 + .../number_value_post_request_body.py | 64 + .../number_value_request_builder.py | 88 + .../oct2_bin/oct2_bin_post_request_body.py | 60 + .../oct2_bin/oct2_bin_request_builder.py | 88 + .../oct2_dec/oct2_dec_post_request_body.py | 56 + .../oct2_dec/oct2_dec_request_builder.py | 88 + .../oct2_hex/oct2_hex_post_request_body.py | 60 + .../oct2_hex/oct2_hex_request_builder.py | 88 + .../functions/odd/odd_post_request_body.py | 56 + .../functions/odd/odd_request_builder.py | 88 + .../odd_f_price_post_request_body.py | 88 + .../odd_f_price_request_builder.py | 88 + .../odd_f_yield_post_request_body.py | 88 + .../odd_f_yield_request_builder.py | 88 + .../odd_l_price_post_request_body.py | 84 + .../odd_l_price_request_builder.py | 88 + .../odd_l_yield_post_request_body.py | 84 + .../odd_l_yield_request_builder.py | 88 + .../functions/or_/or_post_request_body.py | 56 + .../functions/or_/or_request_builder.py | 88 + .../pduration/pduration_post_request_body.py | 64 + .../pduration/pduration_request_builder.py | 88 + .../percent_rank_exc_post_request_body.py | 64 + .../percent_rank_exc_request_builder.py | 88 + .../percent_rank_inc_post_request_body.py | 64 + .../percent_rank_inc_request_builder.py | 88 + .../percentile_exc_post_request_body.py | 60 + .../percentile_exc_request_builder.py | 88 + .../percentile_inc_post_request_body.py | 60 + .../percentile_inc_request_builder.py | 88 + .../permut/permut_post_request_body.py | 60 + .../permut/permut_request_builder.py | 88 + .../permutationa_post_request_body.py | 60 + .../permutationa_request_builder.py | 88 + .../functions/phi/phi_post_request_body.py | 56 + .../functions/phi/phi_request_builder.py | 88 + .../functions/pi/pi_request_builder.py | 80 + .../functions/pmt/pmt_post_request_body.py | 72 + .../functions/pmt/pmt_request_builder.py | 88 + .../poisson_dist_post_request_body.py | 64 + .../poisson_dist_request_builder.py | 88 + .../power/power_post_request_body.py | 60 + .../functions/power/power_request_builder.py | 88 + .../functions/ppmt/ppmt_post_request_body.py | 76 + .../functions/ppmt/ppmt_request_builder.py | 88 + .../price/price_post_request_body.py | 80 + .../functions/price/price_request_builder.py | 88 + .../price_disc_post_request_body.py | 72 + .../price_disc/price_disc_request_builder.py | 88 + .../price_mat/price_mat_post_request_body.py | 76 + .../price_mat/price_mat_request_builder.py | 88 + .../product/product_post_request_body.py | 56 + .../product/product_request_builder.py | 88 + .../proper/proper_post_request_body.py | 56 + .../proper/proper_request_builder.py | 88 + .../functions/pv/pv_post_request_body.py | 72 + .../functions/pv/pv_request_builder.py | 88 + .../quartile_exc_post_request_body.py | 60 + .../quartile_exc_request_builder.py | 88 + .../quartile_inc_post_request_body.py | 60 + .../quartile_inc_request_builder.py | 88 + .../quotient/quotient_post_request_body.py | 60 + .../quotient/quotient_request_builder.py | 88 + .../radians/radians_post_request_body.py | 56 + .../radians/radians_request_builder.py | 88 + .../functions/rand/rand_request_builder.py | 80 + .../rand_between_post_request_body.py | 60 + .../rand_between_request_builder.py | 88 + .../rank_avg/rank_avg_post_request_body.py | 64 + .../rank_avg/rank_avg_request_builder.py | 88 + .../rank_eq/rank_eq_post_request_body.py | 64 + .../rank_eq/rank_eq_request_builder.py | 88 + .../functions/rate/rate_post_request_body.py | 76 + .../functions/rate/rate_request_builder.py | 88 + .../received/received_post_request_body.py | 72 + .../received/received_request_builder.py | 88 + .../replace/replace_post_request_body.py | 68 + .../replace/replace_request_builder.py | 88 + .../replace_b/replace_b_post_request_body.py | 68 + .../replace_b/replace_b_request_builder.py | 88 + .../functions/rept/rept_post_request_body.py | 60 + .../functions/rept/rept_request_builder.py | 88 + .../right/right_post_request_body.py | 60 + .../functions/right/right_request_builder.py | 88 + .../rightb/rightb_post_request_body.py | 60 + .../rightb/rightb_request_builder.py | 88 + .../roman/roman_post_request_body.py | 60 + .../functions/roman/roman_request_builder.py | 88 + .../round/round_post_request_body.py | 60 + .../functions/round/round_request_builder.py | 88 + .../round_down_post_request_body.py | 60 + .../round_down/round_down_request_builder.py | 88 + .../round_up/round_up_post_request_body.py | 60 + .../round_up/round_up_request_builder.py | 88 + .../functions/rows/rows_post_request_body.py | 56 + .../functions/rows/rows_request_builder.py | 88 + .../functions/rri/rri_post_request_body.py | 64 + .../functions/rri/rri_request_builder.py | 88 + .../functions/sec/sec_post_request_body.py | 56 + .../functions/sec/sec_request_builder.py | 88 + .../functions/sech/sech_post_request_body.py | 56 + .../functions/sech/sech_request_builder.py | 88 + .../second/second_post_request_body.py | 56 + .../second/second_request_builder.py | 88 + .../series_sum_post_request_body.py | 68 + .../series_sum/series_sum_request_builder.py | 88 + .../sheet/sheet_post_request_body.py | 56 + .../functions/sheet/sheet_request_builder.py | 88 + .../sheets/sheets_post_request_body.py | 56 + .../sheets/sheets_request_builder.py | 88 + .../functions/sign/sign_post_request_body.py | 56 + .../functions/sign/sign_request_builder.py | 88 + .../functions/sin/sin_post_request_body.py | 56 + .../functions/sin/sin_request_builder.py | 88 + .../functions/sinh/sinh_post_request_body.py | 56 + .../functions/sinh/sinh_request_builder.py | 88 + .../functions/skew/skew_post_request_body.py | 56 + .../functions/skew/skew_request_builder.py | 88 + .../skew_p/skew_p_post_request_body.py | 56 + .../skew_p/skew_p_request_builder.py | 88 + .../functions/sln/sln_post_request_body.py | 64 + .../functions/sln/sln_request_builder.py | 88 + .../small/small_post_request_body.py | 60 + .../functions/small/small_request_builder.py | 88 + .../functions/sqrt/sqrt_post_request_body.py | 56 + .../functions/sqrt/sqrt_request_builder.py | 88 + .../sqrt_pi/sqrt_pi_post_request_body.py | 56 + .../sqrt_pi/sqrt_pi_request_builder.py | 88 + .../st_dev_a/st_dev_a_post_request_body.py | 56 + .../st_dev_a/st_dev_a_request_builder.py | 88 + .../st_dev_p/st_dev_p_post_request_body.py | 56 + .../st_dev_p/st_dev_p_request_builder.py | 88 + .../st_dev_p_a_post_request_body.py | 56 + .../st_dev_p_a/st_dev_p_a_request_builder.py | 88 + .../st_dev_s/st_dev_s_post_request_body.py | 56 + .../st_dev_s/st_dev_s_request_builder.py | 88 + .../standardize_post_request_body.py | 64 + .../standardize_request_builder.py | 88 + .../substitute_post_request_body.py | 68 + .../substitute/substitute_request_builder.py | 88 + .../subtotal/subtotal_post_request_body.py | 60 + .../subtotal/subtotal_request_builder.py | 88 + .../functions/sum/sum_post_request_body.py | 56 + .../functions/sum/sum_request_builder.py | 88 + .../sum_if/sum_if_post_request_body.py | 64 + .../sum_if/sum_if_request_builder.py | 88 + .../sum_ifs/sum_ifs_post_request_body.py | 60 + .../sum_ifs/sum_ifs_request_builder.py | 88 + .../sum_sq/sum_sq_post_request_body.py | 56 + .../sum_sq/sum_sq_request_builder.py | 88 + .../functions/syd/syd_post_request_body.py | 68 + .../functions/syd/syd_request_builder.py | 88 + .../functions/t/t_post_request_body.py | 56 + .../workbook/functions/t/t_request_builder.py | 88 + .../t_dist/t_dist_post_request_body.py | 64 + .../t_dist/t_dist_request_builder.py | 88 + .../t_dist_2_t_post_request_body.py | 60 + .../t_dist_2_t/t_dist_2_t_request_builder.py | 88 + .../t_dist_r_t_post_request_body.py | 60 + .../t_dist_r_t/t_dist_r_t_request_builder.py | 88 + .../t_inv/t_inv_post_request_body.py | 60 + .../functions/t_inv/t_inv_request_builder.py | 88 + .../t_inv_2_t/t_inv_2_t_post_request_body.py | 60 + .../t_inv_2_t/t_inv_2_t_request_builder.py | 88 + .../functions/tan/tan_post_request_body.py | 56 + .../functions/tan/tan_request_builder.py | 88 + .../functions/tanh/tanh_post_request_body.py | 56 + .../functions/tanh/tanh_request_builder.py | 88 + .../tbill_eq/tbill_eq_post_request_body.py | 64 + .../tbill_eq/tbill_eq_request_builder.py | 88 + .../tbill_price_post_request_body.py | 64 + .../tbill_price_request_builder.py | 88 + .../tbill_yield_post_request_body.py | 64 + .../tbill_yield_request_builder.py | 88 + .../functions/text/text_post_request_body.py | 60 + .../functions/text/text_request_builder.py | 88 + .../functions/time/time_post_request_body.py | 64 + .../functions/time/time_request_builder.py | 88 + .../timevalue/timevalue_post_request_body.py | 56 + .../timevalue/timevalue_request_builder.py | 88 + .../functions/today/today_request_builder.py | 80 + .../functions/trim/trim_post_request_body.py | 56 + .../functions/trim/trim_request_builder.py | 88 + .../trim_mean/trim_mean_post_request_body.py | 60 + .../trim_mean/trim_mean_request_builder.py | 88 + .../functions/true_/true_request_builder.py | 80 + .../trunc/trunc_post_request_body.py | 60 + .../functions/trunc/trunc_request_builder.py | 88 + .../functions/type/type_post_request_body.py | 56 + .../functions/type/type_request_builder.py | 88 + .../unichar/unichar_post_request_body.py | 56 + .../unichar/unichar_request_builder.py | 88 + .../unicode/unicode_post_request_body.py | 56 + .../unicode/unicode_request_builder.py | 88 + .../upper/upper_post_request_body.py | 56 + .../functions/upper/upper_request_builder.py | 88 + .../usdollar/usdollar_post_request_body.py | 60 + .../usdollar/usdollar_request_builder.py | 88 + .../value/value_post_request_body.py | 56 + .../functions/value/value_request_builder.py | 88 + .../var_a/var_a_post_request_body.py | 56 + .../functions/var_a/var_a_request_builder.py | 88 + .../var_p/var_p_post_request_body.py | 56 + .../functions/var_p/var_p_request_builder.py | 88 + .../var_p_a/var_p_a_post_request_body.py | 56 + .../var_p_a/var_p_a_request_builder.py | 88 + .../var_s/var_s_post_request_body.py | 56 + .../functions/var_s/var_s_request_builder.py | 88 + .../functions/vdb/vdb_post_request_body.py | 80 + .../functions/vdb/vdb_request_builder.py | 88 + .../vlookup/vlookup_post_request_body.py | 68 + .../vlookup/vlookup_request_builder.py | 88 + .../week_num/week_num_post_request_body.py | 60 + .../week_num/week_num_request_builder.py | 88 + .../weekday/weekday_post_request_body.py | 60 + .../weekday/weekday_request_builder.py | 88 + .../weibull_dist_post_request_body.py | 68 + .../weibull_dist_request_builder.py | 88 + .../work_day/work_day_post_request_body.py | 64 + .../work_day/work_day_request_builder.py | 88 + .../work_day_intl_post_request_body.py | 68 + .../work_day_intl_request_builder.py | 88 + .../functions/xirr/xirr_post_request_body.py | 64 + .../functions/xirr/xirr_request_builder.py | 88 + .../functions/xnpv/xnpv_post_request_body.py | 64 + .../functions/xnpv/xnpv_request_builder.py | 88 + .../functions/xor/xor_post_request_body.py | 56 + .../functions/xor/xor_request_builder.py | 88 + .../functions/year/year_post_request_body.py | 56 + .../functions/year/year_request_builder.py | 88 + .../year_frac/year_frac_post_request_body.py | 64 + .../year_frac/year_frac_request_builder.py | 88 + .../yield_/yield_post_request_body.py | 80 + .../functions/yield_/yield_request_builder.py | 88 + .../yield_disc_post_request_body.py | 72 + .../yield_disc/yield_disc_request_builder.py | 88 + .../yield_mat/yield_mat_post_request_body.py | 76 + .../yield_mat/yield_mat_request_builder.py | 88 + .../z_test/z_test_post_request_body.py | 64 + .../z_test/z_test_request_builder.py | 88 + .../names/add/add_post_request_body.py | 64 + .../workbook/names/add/add_request_builder.py | 89 + .../add_formula_local_post_request_body.py | 57 + .../add_formula_local_request_builder.py | 89 + .../names/count/count_request_builder.py | 103 + .../names/item/range/range_request_builder.py | 81 + ...orkbook_named_item_item_request_builder.py | 207 + .../worksheet/worksheet_request_builder.py | 106 + .../workbook/names/names_request_builder.py | 227 + ...workbook_operation_item_request_builder.py | 187 + .../operations/operations_request_builder.py | 177 + .../refresh_session_request_builder.py | 78 + ..._info_resource_with_key_request_builder.py | 83 + ...eration_result_with_key_request_builder.py | 84 + .../tables/add/add_post_request_body.py | 53 + .../tables/add/add_request_builder.py | 89 + .../tables/count/count_get_response.py | 49 + .../tables/count/count_request_builder.py | 80 + .../clear_filters_request_builder.py | 78 + .../item/columns/add/add_post_request_body.py | 64 + .../item/columns/add/add_request_builder.py | 89 + .../item/columns/columns_request_builder.py | 230 + .../item/columns/count/count_get_response.py | 49 + .../columns/count/count_request_builder.py | 80 + .../data_body_range_request_builder.py | 81 + .../filter/apply/apply_post_request_body.py | 56 + .../filter/apply/apply_request_builder.py | 86 + ...y_bottom_items_filter_post_request_body.py | 49 + ...ply_bottom_items_filter_request_builder.py | 85 + ...bottom_percent_filter_post_request_body.py | 49 + ...y_bottom_percent_filter_request_builder.py | 85 + ...ply_cell_color_filter_post_request_body.py | 49 + ...apply_cell_color_filter_request_builder.py | 85 + .../apply_custom_filter_post_request_body.py | 57 + .../apply_custom_filter_request_builder.py | 85 + .../apply_dynamic_filter_post_request_body.py | 49 + .../apply_dynamic_filter_request_builder.py | 85 + ...ply_font_color_filter_post_request_body.py | 49 + ...apply_font_color_filter_request_builder.py | 85 + .../apply_icon_filter_post_request_body.py | 56 + .../apply_icon_filter_request_builder.py | 85 + ...pply_top_items_filter_post_request_body.py | 49 + .../apply_top_items_filter_request_builder.py | 85 + ...ly_top_percent_filter_post_request_body.py | 49 + ...pply_top_percent_filter_request_builder.py | 85 + .../apply_values_filter_post_request_body.py | 56 + .../apply_values_filter_request_builder.py | 85 + .../filter/clear/clear_request_builder.py | 78 + .../item/filter/filter_request_builder.py | 307 ++ .../header_row_range_request_builder.py | 81 + .../item/range/range_request_builder.py | 81 + .../total_row_range_request_builder.py | 81 + ...kbook_table_column_item_request_builder.py | 237 + .../data_body_range_request_builder.py | 81 + .../filter/filter_request_builder.py | 187 + .../header_row_range_request_builder.py | 81 + .../item_at_with_index_request_builder.py | 134 + .../range/range_request_builder.py | 81 + .../total_row_range_request_builder.py | 81 + .../convert_to_range_request_builder.py | 81 + .../data_body_range_request_builder.py | 81 + .../header_row_range_request_builder.py | 81 + .../item/range/range_request_builder.py | 81 + .../reapply_filters_request_builder.py | 78 + .../item/rows/add/add_post_request_body.py | 60 + .../item/rows/add/add_request_builder.py | 89 + .../item/rows/count/count_get_response.py | 49 + .../item/rows/count/count_request_builder.py | 80 + .../rows/item/range/range_request_builder.py | 80 + ...workbook_table_row_item_request_builder.py | 197 + .../item_at_with_index_request_builder.py | 94 + .../range/range_request_builder.py | 80 + .../tables/item/rows/rows_request_builder.py | 230 + .../sort/apply/apply_post_request_body.py | 64 + .../item/sort/apply/apply_request_builder.py | 86 + .../item/sort/clear/clear_request_builder.py | 78 + .../sort/reapply/reapply_request_builder.py | 78 + .../tables/item/sort/sort_request_builder.py | 217 + .../total_row_range_request_builder.py | 81 + .../workbook_table_item_request_builder.py | 297 ++ .../worksheet/worksheet_request_builder.py | 106 + .../clear_filters_request_builder.py | 78 + .../columns/columns_request_builder.py | 182 + .../convert_to_range_request_builder.py | 81 + .../data_body_range_request_builder.py | 81 + .../header_row_range_request_builder.py | 81 + .../item_at_with_index_request_builder.py | 193 + .../range/range_request_builder.py | 81 + .../reapply_filters_request_builder.py | 78 + .../rows/rows_request_builder.py | 182 + .../sort/sort_request_builder.py | 187 + .../total_row_range_request_builder.py | 81 + .../worksheet/worksheet_request_builder.py | 106 + .../workbook/tables/tables_request_builder.py | 230 + .../item/workbook/workbook_request_builder.py | 313 ++ .../worksheets/add/add_post_request_body.py | 49 + .../worksheets/add/add_request_builder.py | 89 + .../worksheets/count/count_request_builder.py | 103 + ...ll_with_row_with_column_request_builder.py | 86 + .../item/charts/add/add_post_request_body.py | 64 + .../item/charts/add/add_request_builder.py | 89 + .../item/charts/charts_request_builder.py | 243 ++ .../item/charts/count/count_get_response.py | 49 + .../charts/count/count_request_builder.py | 80 + .../charts/item/axes/axes_request_builder.py | 217 + .../category_axis_request_builder.py | 227 + .../format/font/font_request_builder.py | 187 + .../format/format_request_builder.py | 207 + .../line/clear/clear_request_builder.py | 78 + .../format/line/line_request_builder.py | 197 + .../format/format_request_builder.py | 197 + .../line/clear/clear_request_builder.py | 78 + .../format/line/line_request_builder.py | 197 + .../major_gridlines_request_builder.py | 197 + .../format/format_request_builder.py | 197 + .../line/clear/clear_request_builder.py | 78 + .../format/line/line_request_builder.py | 197 + .../minor_gridlines_request_builder.py | 197 + .../title/format/font/font_request_builder.py | 187 + .../title/format/format_request_builder.py | 197 + .../title/title_request_builder.py | 197 + .../format/font/font_request_builder.py | 187 + .../format/format_request_builder.py | 207 + .../line/clear/clear_request_builder.py | 78 + .../format/line/line_request_builder.py | 197 + .../format/format_request_builder.py | 197 + .../line/clear/clear_request_builder.py | 78 + .../format/line/line_request_builder.py | 197 + .../major_gridlines_request_builder.py | 197 + .../format/format_request_builder.py | 197 + .../line/clear/clear_request_builder.py | 78 + .../format/line/line_request_builder.py | 197 + .../minor_gridlines_request_builder.py | 197 + .../series_axis_request_builder.py | 227 + .../title/format/font/font_request_builder.py | 187 + .../title/format/format_request_builder.py | 197 + .../title/title_request_builder.py | 197 + .../format/font/font_request_builder.py | 187 + .../format/format_request_builder.py | 207 + .../line/clear/clear_request_builder.py | 78 + .../format/line/line_request_builder.py | 197 + .../format/format_request_builder.py | 197 + .../line/clear/clear_request_builder.py | 78 + .../format/line/line_request_builder.py | 197 + .../major_gridlines_request_builder.py | 197 + .../format/format_request_builder.py | 197 + .../line/clear/clear_request_builder.py | 78 + .../format/line/line_request_builder.py | 197 + .../minor_gridlines_request_builder.py | 197 + .../title/format/font/font_request_builder.py | 187 + .../title/format/format_request_builder.py | 197 + .../value_axis/title/title_request_builder.py | 197 + .../value_axis/value_axis_request_builder.py | 227 + .../data_labels_request_builder.py | 197 + .../fill/clear/clear_request_builder.py | 78 + .../format/fill/fill_request_builder.py | 207 + .../set_solid_color_post_request_body.py | 49 + .../set_solid_color_request_builder.py | 86 + .../format/font/font_request_builder.py | 187 + .../format/format_request_builder.py | 207 + .../fill/clear/clear_request_builder.py | 78 + .../item/format/fill/fill_request_builder.py | 207 + .../set_solid_color_post_request_body.py | 49 + .../set_solid_color_request_builder.py | 86 + .../item/format/font/font_request_builder.py | 187 + .../item/format/format_request_builder.py | 207 + .../charts/item/image/image_get_response.py | 49 + .../item/image/image_request_builder.py | 80 + .../image_with_width_get_response.py | 49 + .../image_with_width_request_builder.py | 83 + ...age_with_width_with_height_get_response.py | 49 + ..._with_width_with_height_request_builder.py | 85 + ...h_height_with_fitting_mode_get_response.py | 49 + ...eight_with_fitting_mode_request_builder.py | 87 + .../fill/clear/clear_request_builder.py | 78 + .../format/fill/fill_request_builder.py | 207 + .../set_solid_color_post_request_body.py | 49 + .../set_solid_color_request_builder.py | 86 + .../format/font/font_request_builder.py | 187 + .../legend/format/format_request_builder.py | 207 + .../item/legend/legend_request_builder.py | 197 + .../item/series/count/count_get_response.py | 49 + .../series/count/count_request_builder.py | 80 + .../fill/clear/clear_request_builder.py | 78 + .../item/format/fill/fill_request_builder.py | 207 + .../set_solid_color_post_request_body.py | 49 + .../set_solid_color_request_builder.py | 86 + .../item/format/format_request_builder.py | 207 + .../line/clear/clear_request_builder.py | 78 + .../item/format/line/line_request_builder.py | 197 + .../item/points/count/count_get_response.py | 49 + .../points/count/count_request_builder.py | 80 + .../fill/clear/clear_request_builder.py | 78 + .../item/format/fill/fill_request_builder.py | 207 + .../set_solid_color_post_request_body.py | 49 + .../set_solid_color_request_builder.py | 86 + .../item/format/format_request_builder.py | 197 + ...rkbook_chart_point_item_request_builder.py | 197 + .../format/format_request_builder.py | 187 + .../item_at_with_index_request_builder.py | 94 + .../item/points/points_request_builder.py | 220 + ...kbook_chart_series_item_request_builder.py | 207 + .../format/format_request_builder.py | 187 + .../item_at_with_index_request_builder.py | 104 + .../points/points_request_builder.py | 182 + .../item/series/series_request_builder.py | 220 + .../set_data/set_data_post_request_body.py | 60 + .../item/set_data/set_data_request_builder.py | 86 + .../set_position_post_request_body.py | 60 + .../set_position_request_builder.py | 86 + .../fill/clear/clear_request_builder.py | 78 + .../title/format/fill/fill_request_builder.py | 207 + .../set_solid_color_post_request_body.py | 49 + .../set_solid_color_request_builder.py | 86 + .../title/format/font/font_request_builder.py | 187 + .../title/format/format_request_builder.py | 207 + .../item/title/title_request_builder.py | 197 + .../workbook_chart_item_request_builder.py | 335 ++ .../worksheet/worksheet_request_builder.py | 106 + .../axes/axes_request_builder.py | 187 + .../data_labels_request_builder.py | 187 + .../format/format_request_builder.py | 187 + .../image/image_get_response.py | 49 + .../image/image_request_builder.py | 80 + .../image_with_width_get_response.py | 49 + .../image_with_width_request_builder.py | 83 + ...age_with_width_with_height_get_response.py | 49 + ..._with_width_with_height_request_builder.py | 85 + ...h_height_with_fitting_mode_get_response.py | 49 + ...eight_with_fitting_mode_request_builder.py | 87 + .../item_at_with_index_request_builder.py | 232 + .../legend/legend_request_builder.py | 187 + .../series/series_request_builder.py | 182 + .../set_data/set_data_post_request_body.py | 60 + .../set_data/set_data_request_builder.py | 86 + .../set_position_post_request_body.py | 60 + .../set_position_request_builder.py | 86 + .../title/title_request_builder.py | 187 + .../worksheet/worksheet_request_builder.py | 106 + .../axes/axes_request_builder.py | 187 + .../data_labels_request_builder.py | 187 + .../format/format_request_builder.py | 187 + .../image/image_get_response.py | 49 + .../image/image_request_builder.py | 80 + .../image_with_width_get_response.py | 49 + .../image_with_width_request_builder.py | 83 + ...age_with_width_with_height_get_response.py | 49 + ..._with_width_with_height_request_builder.py | 85 + ...h_height_with_fitting_mode_get_response.py | 49 + ...eight_with_fitting_mode_request_builder.py | 87 + .../item_with_name_request_builder.py | 231 + .../legend/legend_request_builder.py | 187 + .../series/series_request_builder.py | 182 + .../set_data/set_data_post_request_body.py | 60 + .../set_data/set_data_request_builder.py | 86 + .../set_position_post_request_body.py | 60 + .../set_position_request_builder.py | 86 + .../title/title_request_builder.py | 187 + .../worksheet/worksheet_request_builder.py | 106 + .../item/names/add/add_post_request_body.py | 64 + .../item/names/add/add_request_builder.py | 89 + .../add_formula_local_post_request_body.py | 57 + .../add_formula_local_request_builder.py | 89 + .../item/names/count/count_request_builder.py | 103 + .../names/item/range/range_request_builder.py | 81 + ...orkbook_named_item_item_request_builder.py | 207 + .../worksheet/worksheet_request_builder.py | 106 + .../item/names/names_request_builder.py | 227 + .../count/count_request_builder.py | 103 + .../item/refresh/refresh_request_builder.py | 78 + ...rkbook_pivot_table_item_request_builder.py | 207 + .../worksheet/worksheet_request_builder.py | 106 + .../pivot_tables_request_builder.py | 217 + .../refresh_all_request_builder.py | 78 + .../protect/protect_post_request_body.py | 56 + .../protect/protect_request_builder.py | 86 + .../protection/protection_request_builder.py | 207 + .../unprotect/unprotect_request_builder.py | 78 + .../item/range/range_request_builder.py | 80 + .../range_with_address_request_builder.py | 83 + .../item/tables/add/add_post_request_body.py | 53 + .../item/tables/add/add_request_builder.py | 89 + .../item/tables/count/count_get_response.py | 49 + .../tables/count/count_request_builder.py | 80 + .../clear_filters_request_builder.py | 78 + .../item/columns/add/add_post_request_body.py | 64 + .../item/columns/add/add_request_builder.py | 89 + .../item/columns/columns_request_builder.py | 230 + .../item/columns/count/count_get_response.py | 49 + .../columns/count/count_request_builder.py | 80 + .../data_body_range_request_builder.py | 81 + .../filter/apply/apply_post_request_body.py | 56 + .../filter/apply/apply_request_builder.py | 86 + ...y_bottom_items_filter_post_request_body.py | 49 + ...ply_bottom_items_filter_request_builder.py | 85 + ...bottom_percent_filter_post_request_body.py | 49 + ...y_bottom_percent_filter_request_builder.py | 85 + ...ply_cell_color_filter_post_request_body.py | 49 + ...apply_cell_color_filter_request_builder.py | 85 + .../apply_custom_filter_post_request_body.py | 57 + .../apply_custom_filter_request_builder.py | 85 + .../apply_dynamic_filter_post_request_body.py | 49 + .../apply_dynamic_filter_request_builder.py | 85 + ...ply_font_color_filter_post_request_body.py | 49 + ...apply_font_color_filter_request_builder.py | 85 + .../apply_icon_filter_post_request_body.py | 56 + .../apply_icon_filter_request_builder.py | 85 + ...pply_top_items_filter_post_request_body.py | 49 + .../apply_top_items_filter_request_builder.py | 85 + ...ly_top_percent_filter_post_request_body.py | 49 + ...pply_top_percent_filter_request_builder.py | 85 + .../apply_values_filter_post_request_body.py | 56 + .../apply_values_filter_request_builder.py | 85 + .../filter/clear/clear_request_builder.py | 78 + .../item/filter/filter_request_builder.py | 307 ++ .../header_row_range_request_builder.py | 81 + .../item/range/range_request_builder.py | 81 + .../total_row_range_request_builder.py | 81 + ...kbook_table_column_item_request_builder.py | 237 + .../data_body_range_request_builder.py | 81 + .../filter/filter_request_builder.py | 187 + .../header_row_range_request_builder.py | 81 + .../item_at_with_index_request_builder.py | 134 + .../range/range_request_builder.py | 81 + .../total_row_range_request_builder.py | 81 + .../convert_to_range_request_builder.py | 81 + .../data_body_range_request_builder.py | 81 + .../header_row_range_request_builder.py | 81 + .../item/range/range_request_builder.py | 81 + .../reapply_filters_request_builder.py | 78 + .../item/rows/add/add_post_request_body.py | 60 + .../item/rows/add/add_request_builder.py | 89 + .../item/rows/count/count_get_response.py | 49 + .../item/rows/count/count_request_builder.py | 80 + .../rows/item/range/range_request_builder.py | 80 + ...workbook_table_row_item_request_builder.py | 197 + .../item_at_with_index_request_builder.py | 94 + .../range/range_request_builder.py | 80 + .../tables/item/rows/rows_request_builder.py | 230 + .../sort/apply/apply_post_request_body.py | 64 + .../item/sort/apply/apply_request_builder.py | 86 + .../item/sort/clear/clear_request_builder.py | 78 + .../sort/reapply/reapply_request_builder.py | 78 + .../tables/item/sort/sort_request_builder.py | 217 + .../total_row_range_request_builder.py | 81 + .../workbook_table_item_request_builder.py | 297 ++ .../worksheet/worksheet_request_builder.py | 106 + .../clear_filters_request_builder.py | 78 + .../columns/columns_request_builder.py | 182 + .../convert_to_range_request_builder.py | 81 + .../data_body_range_request_builder.py | 81 + .../header_row_range_request_builder.py | 81 + .../item_at_with_index_request_builder.py | 193 + .../range/range_request_builder.py | 81 + .../reapply_filters_request_builder.py | 78 + .../rows/rows_request_builder.py | 182 + .../sort/sort_request_builder.py | 187 + .../total_row_range_request_builder.py | 81 + .../worksheet/worksheet_request_builder.py | 106 + .../item/tables/tables_request_builder.py | 230 + .../used_range/used_range_request_builder.py | 80 + ..._range_with_values_only_request_builder.py | 83 + ...workbook_worksheet_item_request_builder.py | 299 ++ .../worksheets/worksheets_request_builder.py | 217 + .../item/drive/items/items_request_builder.py | 207 + .../last_modified_by_user_request_builder.py | 126 + .../mailbox_settings_request_builder.py | 151 + .../count/count_request_builder.py | 103 + ...ice_provisioning_errors_request_builder.py | 146 + .../list_/columns/columns_request_builder.py | 207 + .../columns/count/count_request_builder.py | 103 + .../column_definition_item_request_builder.py | 197 + .../source_column_request_builder.py | 106 + .../add_copy/add_copy_post_request_body.py | 49 + .../add_copy/add_copy_request_builder.py | 89 + ...from_content_type_hub_post_request_body.py | 49 + ...y_from_content_type_hub_request_builder.py | 89 + .../content_types_request_builder.py | 237 + .../count/count_request_builder.py | 103 + ...mpatible_hub_content_types_get_response.py | 57 + ...tible_hub_content_types_request_builder.py | 137 + ...ociate_with_hub_sites_post_request_body.py | 53 + ...ssociate_with_hub_sites_request_builder.py | 86 + .../item/base/base_request_builder_.py | 106 + .../base_types/base_types_request_builder.py | 161 + .../base_types/count/count_request_builder.py | 103 + .../item/content_type_item_request_builder.py | 106 + .../column_links_request_builder.py | 207 + .../count/count_request_builder.py | 103 + .../item/column_link_item_request_builder.py | 187 + .../column_positions_request_builder.py | 161 + .../count/count_request_builder.py | 103 + .../column_definition_item_request_builder.py | 106 + .../item/columns/columns_request_builder.py | 207 + .../columns/count/count_request_builder.py | 103 + .../column_definition_item_request_builder.py | 197 + .../source_column_request_builder.py | 106 + .../item/content_type_item_request_builder.py | 287 ++ ...ault_content_location_post_request_body.py | 60 + ...efault_content_location_request_builder.py | 86 + .../is_published/is_published_get_response.py | 49 + .../is_published_request_builder.py | 81 + .../item/publish/publish_request_builder.py | 78 + .../unpublish/unpublish_request_builder.py | 78 + .../created_by_user_request_builder.py | 126 + .../mailbox_settings_request_builder.py | 151 + .../count/count_request_builder.py | 103 + ...ice_provisioning_errors_request_builder.py | 146 + .../list_/drive/drive_request_builder.py | 106 + .../list_/items/delta/delta_get_response.py | 57 + .../items/delta/delta_request_builder.py | 137 + .../delta_with_token_get_response.py | 57 + .../delta_with_token_request_builder.py | 139 + .../analytics/analytics_request_builder.py | 106 + .../create_link_post_request_body.py | 85 + .../create_link_request_builder.py | 88 + .../created_by_user_request_builder.py | 126 + .../mailbox_settings_request_builder.py | 151 + .../count/count_request_builder.py | 103 + ...ice_provisioning_errors_request_builder.py | 146 + .../count/count_request_builder.py | 103 + .../document_set_versions_request_builder.py | 207 + ...cument_set_version_item_request_builder.py | 207 + .../item/fields/fields_request_builder.py | 187 + .../item/restore/restore_request_builder.py | 78 + .../content/content_request_builder.py | 180 + .../drive_item/drive_item_request_builder.py | 116 + .../item/fields/fields_request_builder.py | 187 + ...get_activities_by_interval_get_response.py | 57 + ..._activities_by_interval_request_builder.py | 136 + ...nd_date_time_with_interval_get_response.py | 57 + ...date_time_with_interval_request_builder.py | 143 + .../last_modified_by_user_request_builder.py | 126 + .../mailbox_settings_request_builder.py | 151 + .../count/count_request_builder.py | 103 + ...ice_provisioning_errors_request_builder.py | 146 + .../item/list_item_item_request_builder.py | 296 ++ .../versions/count/count_request_builder.py | 103 + .../item/fields/fields_request_builder.py | 187 + .../list_item_version_item_request_builder.py | 207 + .../restore_version_request_builder.py | 78 + .../item/versions/versions_request_builder.py | 207 + .../list_/items/items_request_builder.py | 215 + .../last_modified_by_user_request_builder.py | 126 + .../mailbox_settings_request_builder.py | 151 + .../count/count_request_builder.py | 103 + ...ice_provisioning_errors_request_builder.py | 146 + .../item/drive/list_/list_request_builder.py | 267 ++ .../operations/count/count_request_builder.py | 103 + ..._running_operation_item_request_builder.py | 187 + .../operations/operations_request_builder.py | 207 + .../count/count_request_builder.py | 103 + .../reauthorize_request_builder.py | 78 + .../item/subscription_item_request_builder.py | 197 + .../subscriptions_request_builder.py | 207 + .../item/drive/recent/recent_get_response.py | 57 + .../drive/recent/recent_request_builder.py | 137 + .../root/content/content_request_builder.py | 180 + .../item/drive/root/root_request_builder.py | 116 + .../search_with_q_get_response.py | 57 + .../search_with_q_request_builder.py | 140 + .../shared_with_me_get_response.py | 57 + .../shared_with_me_request_builder.py | 137 + .../special/count/count_request_builder.py | 103 + .../item/content/content_request_builder.py | 180 + .../item/drive_item_item_request_builder.py | 116 + .../drive/special/special_request_builder.py | 161 + ..._storage_container_item_request_builder.py | 217 + .../count/count_request_builder.py | 103 + .../item/grant/grant_post_request_body.py | 60 + .../item/grant/grant_post_response.py | 57 + .../item/grant/grant_request_builder.py | 89 + .../item/permission_item_request_builder.py | 197 + .../permissions_request_builder.py | 207 + .../file_storage_request_builder.py | 197 + .../storage/storage_request_builder.py | 161 + ...onversation_member_item_request_builder.py | 12 +- ...lti_tenant_organization_request_builder.py | 6 +- ...hentication_method_item_request_builder.py | 6 +- .../password_methods_request_builder.py | 6 +- ...hentication_method_item_request_builder.py | 6 +- .../software_oath_methods_request_builder.py | 6 +- .../users/item/user_item_request_builder.py | 8 +- .../generated/users/users_request_builder.py | 14 +- 1441 files changed, 136121 insertions(+), 256 deletions(-) create mode 100644 msgraph/generated/identity/authentication_events_flows/authentication_events_flows_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/count/count_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/graph_external_users_self_service_sign_up_events_flow/count/count_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/graph_external_users_self_service_sign_up_events_flow/graph_external_users_self_service_sign_up_events_flow_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/authentication_events_flow_item_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/conditions/applications/applications_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/count/count_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/include_applications_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/item/authentication_condition_application_app_item_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/conditions/conditions_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/applications_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/count/count_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/include_applications_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/item/authentication_condition_application_app_item_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/conditions_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/graph_external_users_self_service_sign_up_events_flow_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/attributes_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/count/count_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/item/identity_user_flow_attribute_item_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/item/ref/ref_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/ref/ref_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/graph_on_attribute_collection_external_users_self_service_sign_up_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/on_attribute_collection_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/graph_on_authentication_method_load_start_external_users_self_service_sign_up_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/count/count_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/identity_providers_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/item/identity_provider_base_item_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/item/ref/ref_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/ref/ref_request_builder.py create mode 100644 msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/on_authentication_method_load_start_request_builder.py create mode 100644 msgraph/generated/models/authentication_attribute_collection_input_configuration.py create mode 100644 msgraph/generated/models/authentication_attribute_collection_input_type.py create mode 100644 msgraph/generated/models/authentication_attribute_collection_option_configuration.py create mode 100644 msgraph/generated/models/authentication_attribute_collection_page.py create mode 100644 msgraph/generated/models/authentication_attribute_collection_page_view_configuration.py create mode 100644 msgraph/generated/models/authentication_condition_application_collection_response.py create mode 100644 msgraph/generated/models/authentication_events_flow.py create mode 100644 msgraph/generated/models/authentication_events_flow_collection_response.py create mode 100644 msgraph/generated/models/external_users_self_service_sign_up_events_flow.py create mode 100644 msgraph/generated/models/external_users_self_service_sign_up_events_flow_collection_response.py create mode 100644 msgraph/generated/models/file_storage.py create mode 100644 msgraph/generated/models/file_storage_container.py create mode 100644 msgraph/generated/models/file_storage_container_collection_response.py create mode 100644 msgraph/generated/models/file_storage_container_custom_property_dictionary.py create mode 100644 msgraph/generated/models/file_storage_container_status.py create mode 100644 msgraph/generated/models/file_storage_container_viewpoint.py create mode 100644 msgraph/generated/models/on_attribute_collection_external_users_self_service_sign_up.py create mode 100644 msgraph/generated/models/on_attribute_collection_handler.py create mode 100644 msgraph/generated/models/on_attribute_collection_listener.py create mode 100644 msgraph/generated/models/on_authentication_method_load_start_external_users_self_service_sign_up.py create mode 100644 msgraph/generated/models/on_authentication_method_load_start_handler.py create mode 100644 msgraph/generated/models/on_authentication_method_load_start_listener.py create mode 100644 msgraph/generated/models/on_interactive_auth_flow_start_external_users_self_service_sign_up.py create mode 100644 msgraph/generated/models/on_interactive_auth_flow_start_handler.py create mode 100644 msgraph/generated/models/on_interactive_auth_flow_start_listener.py create mode 100644 msgraph/generated/models/on_user_create_start_external_users_self_service_sign_up.py create mode 100644 msgraph/generated/models/on_user_create_start_handler.py create mode 100644 msgraph/generated/models/on_user_create_start_listener.py create mode 100644 msgraph/generated/models/site_archival_details.py create mode 100644 msgraph/generated/models/site_archive_status.py create mode 100644 msgraph/generated/models/storage.py create mode 100644 msgraph/generated/models/user_type.py create mode 100644 msgraph/generated/storage/file_storage/containers/containers_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/activate/activate_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/bundles/bundles_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/bundles/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/bundles/item/content/content_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/bundles/item/drive_item_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/created_by_user_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/mailbox_settings/mailbox_settings_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/drive_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/following/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/following/following_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/following/item/content/content_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/following/item/drive_item_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/all_time/all_time_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/analytics_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/last_seven_days/last_seven_days_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/assign_sensitivity_label/assign_sensitivity_label_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkin/checkin_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkin/checkin_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkout/checkout_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/children_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/item/content/content_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/item/drive_item_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/content/content_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/copy/copy_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/copy/copy_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_link/create_link_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_link/create_link_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_upload_session/create_upload_session_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_upload_session/create_upload_session_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/created_by_user_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta/delta_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta/delta_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta_with_token/delta_with_token_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta_with_token/delta_with_token_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/drive_item_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/follow/follow_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_post_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/last_modified_by_user_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/list_item/list_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/permanent_delete/permanent_delete_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_post_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/permission_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/permissions_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/preview/preview_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/preview/preview_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/restore/restore_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/restore/restore_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/retention_label/retention_label_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/search_with_q/search_with_q_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/search_with_q/search_with_q_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/item/subscription_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/subscriptions_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/item/thumbnail_set_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/thumbnails_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/unfollow/unfollow_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/validate_permission/validate_permission_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/validate_permission/validate_permission_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/content/content_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/drive_item_version_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/restore_version/restore_version_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/versions_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/application_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/calculate/calculate_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/calculate/calculate_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/close_session/close_session_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/comments_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/replies_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/workbook_comment_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/create_session/create_session_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/create_session/create_session_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/abs/abs_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/abs/abs_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int/accr_int_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int/accr_int_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int_m/accr_int_m_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acos/acos_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acos/acos_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acosh/acosh_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acosh/acosh_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acot/acot_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acot/acot_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acoth/acoth_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acoth/acoth_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_degrc/amor_degrc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_linc/amor_linc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_linc/amor_linc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/and_/and_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/and_/and_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/arabic/arabic_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/arabic/arabic_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/areas/areas_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/areas/areas_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asc/asc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asc/asc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asin/asin_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asin/asin_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asinh/asinh_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asinh/asinh_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan/atan_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan/atan_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan2/atan2_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan2/atan2_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atanh/atanh_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atanh/atanh_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ave_dev/ave_dev_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ave_dev/ave_dev_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average/average_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average/average_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_a/average_a_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_a/average_a_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_if/average_if_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_if/average_if_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_ifs/average_ifs_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_ifs/average_ifs_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/baht_text/baht_text_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/baht_text/baht_text_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/base/base_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/base/base_request_builder_.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_i/bessel_i_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_i/bessel_i_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_j/bessel_j_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_j/bessel_j_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_k/bessel_k_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_k/bessel_k_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_y/bessel_y_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_y/bessel_y_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_dist/beta_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_dist/beta_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_inv/beta_inv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_inv/beta_inv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_dec/bin2_dec_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_hex/bin2_hex_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_oct/bin2_oct_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist/binom_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist/binom_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist_range/binom_dist_range_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_inv/binom_inv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_inv/binom_inv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitand/bitand_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitand/bitand_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitlshift/bitlshift_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitlshift/bitlshift_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitor/bitor_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitor/bitor_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitrshift/bitrshift_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitrshift/bitrshift_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitxor/bitxor_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitxor/bitxor_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_math/ceiling_math_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_precise/ceiling_precise_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/char/char_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/char/char_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/choose/choose_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/choose/choose_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/clean/clean_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/clean/clean_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/code/code_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/code/code_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/columns/columns_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/columns/columns_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combin/combin_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combin/combin_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combina/combina_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combina/combina_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/complex/complex_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/complex/complex_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/concatenate/concatenate_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/concatenate/concatenate_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_norm/confidence_norm_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_t/confidence_t_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_t/confidence_t_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/convert/convert_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/convert/convert_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cos/cos_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cos/cos_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cosh/cosh_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cosh/cosh_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cot/cot_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cot/cot_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coth/coth_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coth/coth_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count/count_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_a/count_a_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_a/count_a_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_blank/count_blank_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_blank/count_blank_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_if/count_if_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_if/count_if_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_ifs/count_ifs_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_ifs/count_ifs_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_day_bs/coup_day_bs_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days/coup_days_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days/coup_days_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days_nc/coup_days_nc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_ncd/coup_ncd_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_num/coup_num_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_num/coup_num_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_pcd/coup_pcd_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csc/csc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csc/csc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csch/csch_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csch/csch_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_princ/cum_princ_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_princ/cum_princ_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/date/date_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/date/date_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/datevalue/datevalue_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/datevalue/datevalue_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/daverage/daverage_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/daverage/daverage_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/day/day_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/day/day_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days/days_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days/days_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days360/days360_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days360/days360_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/db/db_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/db/db_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dbcs/dbcs_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dbcs/dbcs_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount/dcount_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount/dcount_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount_a/dcount_a_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount_a/dcount_a_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ddb/ddb_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ddb/ddb_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_bin/dec2_bin_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_hex/dec2_hex_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_oct/dec2_oct_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/decimal/decimal_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/decimal/decimal_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/degrees/degrees_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/degrees/degrees_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/delta/delta_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/delta/delta_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dev_sq/dev_sq_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dev_sq/dev_sq_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dget/dget_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dget/dget_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/disc/disc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/disc/disc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmax/dmax_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmax/dmax_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmin/dmin_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmin/dmin_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar/dollar_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar/dollar_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_de/dollar_de_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_de/dollar_de_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_fr/dollar_fr_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dproduct/dproduct_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dproduct/dproduct_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev/dst_dev_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev/dst_dev_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev_p/dst_dev_p_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dsum/dsum_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dsum/dsum_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/duration/duration_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/duration/duration_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar/dvar_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar/dvar_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar_p/dvar_p_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar_p/dvar_p_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/edate/edate_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/edate/edate_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/effect/effect_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/effect/effect_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/eo_month/eo_month_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/eo_month/eo_month_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf/erf_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf/erf_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c/erf_c_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c/erf_c_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c_precise/erf_c_precise_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_precise/erf_precise_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_precise/erf_precise_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/error_type/error_type_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/error_type/error_type_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/even/even_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/even/even_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exact/exact_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exact/exact_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exp/exp_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exp/exp_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/expon_dist/expon_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/expon_dist/expon_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist/f_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist/f_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv/f_inv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv/f_inv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact/fact_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact/fact_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact_double/fact_double_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact_double/fact_double_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/false_/false_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find/find_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find/find_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find_b/find_b_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find_b/find_b_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher/fisher_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher/fisher_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher_inv/fisher_inv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher_inv/fisher_inv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fixed/fixed_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fixed/fixed_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_math/floor_math_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_math/floor_math_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_precise/floor_precise_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_precise/floor_precise_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/functions_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fv/fv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fv/fv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fvschedule/fvschedule_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fvschedule/fvschedule_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma/gamma_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma/gamma_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_dist/gamma_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_dist/gamma_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_inv/gamma_inv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_inv/gamma_inv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln/gamma_ln_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln/gamma_ln_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gauss/gauss_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gauss/gauss_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gcd/gcd_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gcd/gcd_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ge_step/ge_step_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ge_step/ge_step_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/geo_mean/geo_mean_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/geo_mean/geo_mean_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/har_mean/har_mean_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/har_mean/har_mean_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_bin/hex2_bin_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_bin/hex2_bin_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_dec/hex2_dec_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_dec/hex2_dec_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_oct/hex2_oct_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_oct/hex2_oct_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hlookup/hlookup_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hlookup/hlookup_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hour/hour_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hour/hour_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyperlink/hyperlink_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyperlink/hyperlink_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/if_/if_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/if_/if_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_abs/im_abs_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_abs/im_abs_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_argument/im_argument_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_argument/im_argument_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_conjugate/im_conjugate_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_conjugate/im_conjugate_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cos/im_cos_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cos/im_cos_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cosh/im_cosh_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cosh/im_cosh_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cot/im_cot_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cot/im_cot_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csc/im_csc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csc/im_csc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csch/im_csch_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csch/im_csch_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_div/im_div_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_div/im_div_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_exp/im_exp_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_exp/im_exp_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_ln/im_ln_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_ln/im_ln_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log10/im_log10_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log10/im_log10_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log2/im_log2_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log2/im_log2_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_power/im_power_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_power/im_power_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_product/im_product_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_product/im_product_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_real/im_real_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_real/im_real_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sec/im_sec_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sec/im_sec_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sech/im_sech_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sech/im_sech_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sin/im_sin_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sin/im_sin_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sinh/im_sinh_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sinh/im_sinh_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sqrt/im_sqrt_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sqrt/im_sqrt_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sub/im_sub_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sub/im_sub_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sum/im_sum_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sum/im_sum_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_tan/im_tan_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_tan/im_tan_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/imaginary/imaginary_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/imaginary/imaginary_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int/int_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int/int_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int_rate/int_rate_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int_rate/int_rate_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ipmt/ipmt_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ipmt/ipmt_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/irr/irr_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/irr/irr_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_err/is_err_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_err/is_err_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_error/is_error_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_error/is_error_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_even/is_even_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_even/is_even_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_formula/is_formula_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_formula/is_formula_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_logical/is_logical_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_logical/is_logical_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_n_a/is_n_a_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_n_a/is_n_a_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_non_text/is_non_text_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_non_text/is_non_text_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_number/is_number_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_number/is_number_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_odd/is_odd_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_odd/is_odd_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_text/is_text_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_text/is_text_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_ceiling/iso_ceiling_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_ceiling/iso_ceiling_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_week_num/iso_week_num_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_week_num/iso_week_num_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ispmt/ispmt_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ispmt/ispmt_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/isref/isref_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/isref/isref_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/kurt/kurt_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/kurt/kurt_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/large/large_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/large/large_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lcm/lcm_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lcm/lcm_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/left/left_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/left/left_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/leftb/leftb_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/leftb/leftb_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/len/len_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/len/len_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lenb/lenb_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lenb/lenb_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ln/ln_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ln/ln_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log/log_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log/log_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log10/log10_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log10/log10_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_dist/log_norm_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_dist/log_norm_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_inv/log_norm_inv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_inv/log_norm_inv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lookup/lookup_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lookup/lookup_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lower/lower_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lower/lower_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/match/match_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/match/match_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max/max_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max/max_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max_a/max_a_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max_a/max_a_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mduration/mduration_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mduration/mduration_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/median/median_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/median/median_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mid/mid_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mid/mid_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/midb/midb_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/midb/midb_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min/min_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min/min_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min_a/min_a_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min_a/min_a_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/minute/minute_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/minute/minute_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mirr/mirr_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mirr/mirr_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mod/mod_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mod/mod_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/month/month_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/month/month_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mround/mround_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mround/mround_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/multi_nomial/multi_nomial_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/multi_nomial/multi_nomial_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/n/n_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/n/n_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/na/na_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days/network_days_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days/network_days_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days_intl/network_days_intl_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days_intl/network_days_intl_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nominal/nominal_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nominal/nominal_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_dist/norm_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_dist/norm_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_inv/norm_inv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_inv/norm_inv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_dist/norm_s_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_dist/norm_s_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_inv/norm_s_inv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_inv/norm_s_inv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/not_/not_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/not_/not_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/now/now_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nper/nper_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nper/nper_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/npv/npv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/npv/npv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/number_value/number_value_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/number_value/number_value_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_bin/oct2_bin_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_bin/oct2_bin_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_dec/oct2_dec_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_dec/oct2_dec_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_hex/oct2_hex_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_hex/oct2_hex_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd/odd_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd/odd_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_price/odd_f_price_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_price/odd_f_price_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_yield/odd_f_yield_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_yield/odd_f_yield_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_price/odd_l_price_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_price/odd_l_price_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_yield/odd_l_yield_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_yield/odd_l_yield_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/or_/or_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/or_/or_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pduration/pduration_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pduration/pduration_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_exc/percentile_exc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_exc/percentile_exc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_inc/percentile_inc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_inc/percentile_inc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permut/permut_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permut/permut_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permutationa/permutationa_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permutationa/permutationa_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/phi/phi_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/phi/phi_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pi/pi_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pmt/pmt_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pmt/pmt_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/poisson_dist/poisson_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/poisson_dist/poisson_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/power/power_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/power/power_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ppmt/ppmt_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ppmt/ppmt_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price/price_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price/price_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_disc/price_disc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_disc/price_disc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_mat/price_mat_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_mat/price_mat_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/product/product_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/product/product_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/proper/proper_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/proper/proper_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pv/pv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pv/pv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_exc/quartile_exc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_exc/quartile_exc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_inc/quartile_inc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_inc/quartile_inc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quotient/quotient_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quotient/quotient_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/radians/radians_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/radians/radians_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand/rand_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand_between/rand_between_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand_between/rand_between_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_avg/rank_avg_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_avg/rank_avg_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_eq/rank_eq_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_eq/rank_eq_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rate/rate_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rate/rate_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/received/received_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/received/received_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace/replace_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace/replace_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace_b/replace_b_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace_b/replace_b_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rept/rept_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rept/rept_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/right/right_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/right/right_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rightb/rightb_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rightb/rightb_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/roman/roman_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/roman/roman_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round/round_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round/round_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_down/round_down_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_down/round_down_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_up/round_up_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_up/round_up_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rows/rows_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rows/rows_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rri/rri_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rri/rri_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sec/sec_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sec/sec_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sech/sech_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sech/sech_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/second/second_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/second/second_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/series_sum/series_sum_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/series_sum/series_sum_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheet/sheet_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheet/sheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheets/sheets_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheets/sheets_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sign/sign_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sign/sign_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sin/sin_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sin/sin_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sinh/sinh_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sinh/sinh_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew/skew_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew/skew_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew_p/skew_p_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew_p/skew_p_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sln/sln_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sln/sln_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/small/small_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/small/small_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt/sqrt_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt/sqrt_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt_pi/sqrt_pi_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt_pi/sqrt_pi_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_a/st_dev_a_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_a/st_dev_a_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p/st_dev_p_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p/st_dev_p_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_s/st_dev_s_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_s/st_dev_s_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/standardize/standardize_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/standardize/standardize_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/substitute/substitute_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/substitute/substitute_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/subtotal/subtotal_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/subtotal/subtotal_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum/sum_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum/sum_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_if/sum_if_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_if/sum_if_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_ifs/sum_ifs_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_ifs/sum_ifs_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_sq/sum_sq_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_sq/sum_sq_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/syd/syd_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/syd/syd_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t/t_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t/t_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist/t_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist/t_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv/t_inv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv/t_inv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tan/tan_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tan/tan_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tanh/tanh_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tanh/tanh_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_eq/tbill_eq_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_eq/tbill_eq_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_price/tbill_price_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_price/tbill_price_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_yield/tbill_yield_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_yield/tbill_yield_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/text/text_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/text/text_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/time/time_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/time/time_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/timevalue/timevalue_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/timevalue/timevalue_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/today/today_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim/trim_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim/trim_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim_mean/trim_mean_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim_mean/trim_mean_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/true_/true_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trunc/trunc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trunc/trunc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/type/type_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/type/type_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unichar/unichar_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unichar/unichar_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unicode/unicode_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unicode/unicode_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/upper/upper_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/upper/upper_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/usdollar/usdollar_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/usdollar/usdollar_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/value/value_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/value/value_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_a/var_a_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_a/var_a_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p/var_p_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p/var_p_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p_a/var_p_a_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p_a/var_p_a_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_s/var_s_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_s/var_s_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vdb/vdb_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vdb/vdb_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vlookup/vlookup_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vlookup/vlookup_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/week_num/week_num_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/week_num/week_num_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weekday/weekday_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weekday/weekday_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weibull_dist/weibull_dist_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weibull_dist/weibull_dist_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day/work_day_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day/work_day_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day_intl/work_day_intl_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day_intl/work_day_intl_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xirr/xirr_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xirr/xirr_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xnpv/xnpv_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xnpv/xnpv_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xor/xor_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xor/xor_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year/year_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year/year_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year_frac/year_frac_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year_frac/year_frac_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_/yield_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_/yield_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_disc/yield_disc_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_disc/yield_disc_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_mat/yield_mat_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_mat/yield_mat_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/z_test/z_test_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/z_test/z_test_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add/add_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add/add_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add_formula_local/add_formula_local_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add_formula_local/add_formula_local_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/workbook_named_item_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/names_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/operations/item/workbook_operation_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/operations/operations_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/refresh_session/refresh_session_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/session_info_resource_with_key/session_info_resource_with_key_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/table_row_operation_result_with_key/table_row_operation_result_with_key_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/add/add_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/add/add_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/count/count_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/clear_filters/clear_filters_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/add/add_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/add/add_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/columns_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/count/count_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply/apply_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply/apply_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/workbook_table_column_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/filter/filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/convert_to_range/convert_to_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/reapply_filters/reapply_filters_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/add/add_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/add/add_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/count/count_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item/workbook_table_row_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/rows_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/apply/apply_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/apply/apply_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/reapply/reapply_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/sort_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/workbook_table_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/columns/columns_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/item_at_with_index_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/rows/rows_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/sort/sort_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/tables_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/workbook_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/add/add_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/add/add_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/cell_with_row_with_column/cell_with_row_with_column_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/add/add_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/add/add_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/charts_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/count/count_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/axes_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/category_axis_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/font/font_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/line_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/line_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/major_gridlines_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/line_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/minor_gridlines_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/font/font_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/title_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/font/font_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/line_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/line_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/major_gridlines_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/line_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/minor_gridlines_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/series_axis_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/font/font_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/title_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/font/font_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/line_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/line_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/major_gridlines_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/line_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/minor_gridlines_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/font/font_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/title_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/value_axis_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/data_labels_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/fill_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/font/font_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/fill_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/font/font_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image/image_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image/image_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/fill_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/font/font_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/legend_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/count/count_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/fill_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/line/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/line/line_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/fill_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/workbook_chart_point_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/item_at_with_index_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/points_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/workbook_chart_series_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/item_at_with_index_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/points/points_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/series_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_data/set_data_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_data/set_data_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_position/set_position_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_position/set_position_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/fill_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/font/font_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/title_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/workbook_chart_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/axes/axes_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/data_labels/data_labels_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height/image_with_width_with_height_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height/image_with_width_with_height_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/item_at_with_index_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/legend/legend_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/series/series_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/title/title_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/axes/axes_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/data_labels/data_labels_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/format/format_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image/image_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image/image_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height/image_with_width_with_height_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height/image_with_width_with_height_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/item_with_name_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/legend/legend_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/series/series_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/title/title_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add/add_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add/add_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/workbook_named_item_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/names_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/refresh/refresh_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/workbook_pivot_table_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/pivot_tables_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/refresh_all/refresh_all_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protect/protect_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protect/protect_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protection_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/unprotect/unprotect_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/range_with_address/range_with_address_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/add/add_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/add/add_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/count/count_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/clear_filters/clear_filters_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/add/add_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/add/add_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/columns_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/count/count_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/workbook_table_column_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/filter/filter_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/convert_to_range/convert_to_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/reapply_filters/reapply_filters_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/add/add_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/add/add_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/count/count_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item/workbook_table_row_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/rows_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/clear/clear_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/reapply/reapply_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/sort_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/workbook_table_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/columns/columns_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/item_at_with_index_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/range/range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/rows/rows_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/sort/sort_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/worksheet/worksheet_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/tables_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/used_range/used_range_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/used_range_with_values_only/used_range_with_values_only_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/workbook_worksheet_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/worksheets_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/items/items_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/last_modified_by_user_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/columns_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/item/column_definition_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/item/source_column/source_column_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy/add_copy_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy/add_copy_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/content_types_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base/base_request_builder_.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/base_types_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/item/content_type_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/column_links_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/item/column_link_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/column_positions_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/columns_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/item/column_definition_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/item/source_column/source_column_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/content_type_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/is_published/is_published_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/is_published/is_published_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/publish/publish_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/unpublish/unpublish_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/created_by_user_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/drive/drive_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta/delta_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta/delta_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta_with_token/delta_with_token_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta_with_token/delta_with_token_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/analytics/analytics_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/create_link/create_link_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/create_link/create_link_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/created_by_user_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/document_set_versions_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/fields/fields_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/restore/restore_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/drive_item/content/content_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/drive_item/drive_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/fields/fields_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/list_item_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/fields/fields_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/list_item_version_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/restore_version/restore_version_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/versions_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/items/items_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/last_modified_by_user_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/list_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/item/rich_long_running_operation_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/operations_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/item/subscription_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/subscriptions_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/recent/recent_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/recent/recent_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/root/content/content_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/root/root_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/search_with_q/search_with_q_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/search_with_q/search_with_q_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/shared_with_me/shared_with_me_get_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/shared_with_me/shared_with_me_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/special/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/special/item/content/content_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/special/item/drive_item_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/drive/special/special_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/file_storage_container_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/permissions/count/count_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_post_request_body.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_post_response.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/permissions/item/permission_item_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/containers/item/permissions/permissions_request_builder.py create mode 100644 msgraph/generated/storage/file_storage/file_storage_request_builder.py create mode 100644 msgraph/generated/storage/storage_request_builder.py diff --git a/msgraph/generated/base_graph_service_client.py b/msgraph/generated/base_graph_service_client.py index 3577f40315d..080713c846d 100644 --- a/msgraph/generated/base_graph_service_client.py +++ b/msgraph/generated/base_graph_service_client.py @@ -81,6 +81,7 @@ from .shares.shares_request_builder import SharesRequestBuilder from .sites.sites_request_builder import SitesRequestBuilder from .solutions.solutions_request_builder import SolutionsRequestBuilder + from .storage.storage_request_builder import StorageRequestBuilder from .subscribed_skus.subscribed_skus_request_builder import SubscribedSkusRequestBuilder from .subscriptions.subscriptions_request_builder import SubscriptionsRequestBuilder from .teams.teams_request_builder import TeamsRequestBuilder @@ -727,6 +728,15 @@ def solutions(self) -> SolutionsRequestBuilder: return SolutionsRequestBuilder(self.request_adapter, self.path_parameters) + @property + def storage(self) -> StorageRequestBuilder: + """ + Provides operations to manage the storage singleton. + """ + from .storage.storage_request_builder import StorageRequestBuilder + + return StorageRequestBuilder(self.request_adapter, self.path_parameters) + @property def subscribed_skus(self) -> SubscribedSkusRequestBuilder: """ diff --git a/msgraph/generated/chats/item/messages/messages_request_builder.py b/msgraph/generated/chats/item/messages/messages_request_builder.py index 6e8974ae400..1cd00ab69f7 100644 --- a/msgraph/generated/chats/item/messages/messages_request_builder.py +++ b/msgraph/generated/chats/item/messages/messages_request_builder.py @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Messages async def post(self,body: ChatMessage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ChatMessage]: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ChatMessage] - Find more info here: https://learn.microsoft.com/graph/api/chatmessage-post?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/chat-post-messages?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -105,7 +105,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_post_request_information(self,body: ChatMessage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Send a new chatMessage in the specified channel or a chat. + Send a new chatMessage in the specified chat. This API can't create a new chat; you must use the list chats method to retrieve the ID of an existing chat before you can create a chat message. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation diff --git a/msgraph/generated/device_app_management/device_app_management_request_builder.py b/msgraph/generated/device_app_management/device_app_management_request_builder.py index 8879f5801b6..88b8e644214 100644 --- a/msgraph/generated/device_app_management/device_app_management_request_builder.py +++ b/msgraph/generated/device_app_management/device_app_management_request_builder.py @@ -49,7 +49,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[DeviceAp Read properties and relationships of the deviceAppManagement object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceAppManagement] - Find more info here: https://learn.microsoft.com/graph/api/intune-policyset-deviceappmanagement-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-books-deviceappmanagement-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -71,7 +71,7 @@ async def patch(self,body: DeviceAppManagement, request_configuration: Optional[ param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceAppManagement] - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-deviceappmanagement-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceappmanagement-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") diff --git a/msgraph/generated/device_app_management/managed_app_policies/managed_app_policies_request_builder.py b/msgraph/generated/device_app_management/managed_app_policies/managed_app_policies_request_builder.py index c83f342419d..441944531bc 100644 --- a/msgraph/generated/device_app_management/managed_app_policies/managed_app_policies_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_policies/managed_app_policies_request_builder.py @@ -48,10 +48,10 @@ def by_managed_app_policy_id(self,managed_app_policy_id: str) -> ManagedAppPolic async def get(self,request_configuration: Optional[RequestConfiguration[ManagedAppPoliciesRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedAppPolicyCollectionResponse]: """ - List properties and relationships of the managedAppProtection objects. + List properties and relationships of the managedAppPolicy objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedAppPolicyCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedappprotection-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-managedapppolicy-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -92,7 +92,7 @@ async def post(self,body: ManagedAppPolicy, request_configuration: Optional[Requ def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedAppPoliciesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - List properties and relationships of the managedAppProtection objects. + List properties and relationships of the managedAppPolicy objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -138,7 +138,7 @@ def count(self) -> CountRequestBuilder: @dataclass class ManagedAppPoliciesRequestBuilderGetQueryParameters(): """ - List properties and relationships of the managedAppProtection objects. + List properties and relationships of the managedAppPolicy objects. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_app_management/managed_app_registrations/item/managed_app_registration_item_request_builder.py b/msgraph/generated/device_app_management/managed_app_registrations/item/managed_app_registration_item_request_builder.py index b2485b487d6..5f785129780 100644 --- a/msgraph/generated/device_app_management/managed_app_registrations/item/managed_app_registration_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_app_registrations/item/managed_app_registration_item_request_builder.py @@ -52,10 +52,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[ManagedAppRegistrationItemRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedAppRegistration]: """ - Read properties and relationships of the androidManagedAppRegistration object. + Read properties and relationships of the iosManagedAppRegistration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedAppRegistration] - Find more info here: https://learn.microsoft.com/graph/api/intune-mam-androidmanagedappregistration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-iosmanagedappregistration-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -107,7 +107,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedAppRegistrationItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read properties and relationships of the androidManagedAppRegistration object. + Read properties and relationships of the iosManagedAppRegistration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -178,7 +178,7 @@ class ManagedAppRegistrationItemRequestBuilderDeleteRequestConfiguration(Request @dataclass class ManagedAppRegistrationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the androidManagedAppRegistration object. + Read properties and relationships of the iosManagedAppRegistration object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_app_management/managed_e_books/item/assignments/assignments_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/assignments/assignments_request_builder.py index 587ec7451ab..dcefabe5836 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/assignments/assignments_request_builder.py @@ -48,10 +48,10 @@ def by_managed_e_book_assignment_id(self,managed_e_book_assignment_id: str) -> M async def get(self,request_configuration: Optional[RequestConfiguration[AssignmentsRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedEBookAssignmentCollectionResponse]: """ - List properties and relationships of the iosVppEBookAssignment objects. + List properties and relationships of the managedEBookAssignment objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedEBookAssignmentCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-books-iosvppebookassignment-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-books-managedebookassignment-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -69,11 +69,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Assignme async def post(self,body: ManagedEBookAssignment, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ManagedEBookAssignment]: """ - Create a new managedEBookAssignment object. + Create a new iosVppEBookAssignment object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedEBookAssignment] - Find more info here: https://learn.microsoft.com/graph/api/intune-books-managedebookassignment-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-books-iosvppebookassignment-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,7 +93,7 @@ async def post(self,body: ManagedEBookAssignment, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AssignmentsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - List properties and relationships of the iosVppEBookAssignment objects. + List properties and relationships of the managedEBookAssignment objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -104,7 +104,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_post_request_information(self,body: ManagedEBookAssignment, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Create a new managedEBookAssignment object. + Create a new iosVppEBookAssignment object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -139,7 +139,7 @@ def count(self) -> CountRequestBuilder: @dataclass class AssignmentsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the iosVppEBookAssignment objects. + List properties and relationships of the managedEBookAssignment objects. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.py index f583eafa79d..3cd58137cc9 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/assignments/item/managed_e_book_assignment_item_request_builder.py @@ -31,10 +31,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: """ - Deletes a iosVppEBookAssignment. + Deletes a managedEBookAssignment. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None - Find more info here: https://learn.microsoft.com/graph/api/intune-books-iosvppebookassignment-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-books-managedebookassignment-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -50,10 +50,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[ManagedEBookAssignmentItemRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedEBookAssignment]: """ - Read properties and relationships of the managedEBookAssignment object. + Read properties and relationships of the iosVppEBookAssignment object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedEBookAssignment] - Find more info here: https://learn.microsoft.com/graph/api/intune-books-managedebookassignment-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-books-iosvppebookassignment-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -95,7 +95,7 @@ async def patch(self,body: ManagedEBookAssignment, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Deletes a iosVppEBookAssignment. + Deletes a managedEBookAssignment. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -106,7 +106,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedEBookAssignmentItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read properties and relationships of the managedEBookAssignment object. + Read properties and relationships of the iosVppEBookAssignment object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -150,7 +150,7 @@ class ManagedEBookAssignmentItemRequestBuilderDeleteRequestConfiguration(Request @dataclass class ManagedEBookAssignmentItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the managedEBookAssignment object. + Read properties and relationships of the iosVppEBookAssignment object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.py b/msgraph/generated/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.py index b091b0185c6..e63f3220fae 100644 --- a/msgraph/generated/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.py +++ b/msgraph/generated/device_app_management/managed_e_books/item/managed_e_book_item_request_builder.py @@ -55,10 +55,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[ManagedEBookItemRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedEBook]: """ - Read properties and relationships of the managedEBook object. + Read properties and relationships of the iosVppEBook object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedEBook] - Find more info here: https://learn.microsoft.com/graph/api/intune-books-managedebook-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-books-iosvppebook-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -111,7 +111,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedEBookItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read properties and relationships of the managedEBook object. + Read properties and relationships of the iosVppEBook object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -200,7 +200,7 @@ class ManagedEBookItemRequestBuilderDeleteRequestConfiguration(RequestConfigurat @dataclass class ManagedEBookItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the managedEBook object. + Read properties and relationships of the iosVppEBook object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/item/managed_device_mobile_app_configuration_item_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/item/managed_device_mobile_app_configuration_item_request_builder.py index 76f38ad6eed..295308c45ab 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/item/managed_device_mobile_app_configuration_item_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/item/managed_device_mobile_app_configuration_item_request_builder.py @@ -56,10 +56,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[ManagedDeviceMobileAppConfigurationItemRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedDeviceMobileAppConfiguration]: """ - Read properties and relationships of the iosMobileAppConfiguration object. + Read properties and relationships of the managedDeviceMobileAppConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedDeviceMobileAppConfiguration] - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-iosmobileappconfiguration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-manageddevicemobileappconfiguration-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -112,7 +112,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ManagedDeviceMobileAppConfigurationItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read properties and relationships of the iosMobileAppConfiguration object. + Read properties and relationships of the managedDeviceMobileAppConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -210,7 +210,7 @@ class ManagedDeviceMobileAppConfigurationItemRequestBuilderDeleteRequestConfigur @dataclass class ManagedDeviceMobileAppConfigurationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the iosMobileAppConfiguration object. + Read properties and relationships of the managedDeviceMobileAppConfiguration object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_app_management/mobile_app_configurations/mobile_app_configurations_request_builder.py b/msgraph/generated/device_app_management/mobile_app_configurations/mobile_app_configurations_request_builder.py index 76a3972a5fa..213eea31101 100644 --- a/msgraph/generated/device_app_management/mobile_app_configurations/mobile_app_configurations_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_app_configurations/mobile_app_configurations_request_builder.py @@ -48,10 +48,10 @@ def by_managed_device_mobile_app_configuration_id(self,managed_device_mobile_app async def get(self,request_configuration: Optional[RequestConfiguration[MobileAppConfigurationsRequestBuilderGetQueryParameters]] = None) -> Optional[ManagedDeviceMobileAppConfigurationCollectionResponse]: """ - List properties and relationships of the managedDeviceMobileAppConfiguration objects. + List properties and relationships of the iosMobileAppConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ManagedDeviceMobileAppConfigurationCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-manageddevicemobileappconfiguration-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-iosmobileappconfiguration-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -93,7 +93,7 @@ async def post(self,body: ManagedDeviceMobileAppConfiguration, request_configura def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MobileAppConfigurationsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - List properties and relationships of the managedDeviceMobileAppConfiguration objects. + List properties and relationships of the iosMobileAppConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -139,7 +139,7 @@ def count(self) -> CountRequestBuilder: @dataclass class MobileAppConfigurationsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the managedDeviceMobileAppConfiguration objects. + List properties and relationships of the iosMobileAppConfiguration objects. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_app_management/mobile_apps/item/mobile_app_item_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/item/mobile_app_item_request_builder.py index 7d3137bdfbe..f424f42ad33 100644 --- a/msgraph/generated/device_app_management/mobile_apps/item/mobile_app_item_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/item/mobile_app_item_request_builder.py @@ -50,10 +50,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: """ - Deletes a windowsMicrosoftEdgeApp. + Deletes a iosLobApp. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-windowsmicrosoftedgeapp-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-ioslobapp-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -69,10 +69,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[MobileAppItemRequestBuilderGetQueryParameters]] = None) -> Optional[MobileApp]: """ - Read properties and relationships of the macOSOfficeSuiteApp object. + Read properties and relationships of the windowsUniversalAppX object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MobileApp] - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-macosofficesuiteapp-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-windowsuniversalappx-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -90,11 +90,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MobileAp async def patch(self,body: MobileApp, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MobileApp]: """ - Update the properties of a iosStoreApp object. + Update the properties of a windowsMicrosoftEdgeApp object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MobileApp] - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-iosstoreapp-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-windowsmicrosoftedgeapp-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -114,7 +114,7 @@ async def patch(self,body: MobileApp, request_configuration: Optional[RequestCon def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Deletes a windowsMicrosoftEdgeApp. + Deletes a iosLobApp. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -125,7 +125,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MobileAppItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read properties and relationships of the macOSOfficeSuiteApp object. + Read properties and relationships of the windowsUniversalAppX object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -136,7 +136,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_patch_request_information(self,body: MobileApp, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Update the properties of a iosStoreApp object. + Update the properties of a windowsMicrosoftEdgeApp object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -340,7 +340,7 @@ class MobileAppItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration @dataclass class MobileAppItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the macOSOfficeSuiteApp object. + Read properties and relationships of the windowsUniversalAppX object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_app_management/mobile_apps/mobile_apps_request_builder.py b/msgraph/generated/device_app_management/mobile_apps/mobile_apps_request_builder.py index ec38458d14f..c5201058099 100644 --- a/msgraph/generated/device_app_management/mobile_apps/mobile_apps_request_builder.py +++ b/msgraph/generated/device_app_management/mobile_apps/mobile_apps_request_builder.py @@ -64,10 +64,10 @@ def by_mobile_app_id(self,mobile_app_id: str) -> MobileAppItemRequestBuilder: async def get(self,request_configuration: Optional[RequestConfiguration[MobileAppsRequestBuilderGetQueryParameters]] = None) -> Optional[MobileAppCollectionResponse]: """ - List properties and relationships of the windowsMobileMSI objects. + List properties and relationships of the macOSLobApp objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MobileAppCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-windowsmobilemsi-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-macoslobapp-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -85,11 +85,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MobileAp async def post(self,body: MobileApp, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MobileApp]: """ - Create a new macOSOfficeSuiteApp object. + Create a new iosLobApp object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MobileApp] - Find more info here: https://learn.microsoft.com/graph/api/intune-apps-macosofficesuiteapp-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-apps-ioslobapp-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -109,7 +109,7 @@ async def post(self,body: MobileApp, request_configuration: Optional[RequestConf def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MobileAppsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - List properties and relationships of the windowsMobileMSI objects. + List properties and relationships of the macOSLobApp objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -120,7 +120,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_post_request_information(self,body: MobileApp, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Create a new macOSOfficeSuiteApp object. + Create a new iosLobApp object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -299,7 +299,7 @@ def graph_windows_web_app(self) -> GraphWindowsWebAppRequestBuilder: @dataclass class MobileAppsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the windowsMobileMSI objects. + List properties and relationships of the macOSLobApp objects. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_management/device_compliance_policies/device_compliance_policies_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/device_compliance_policies_request_builder.py index d939c498f5b..cb86a7e3145 100644 --- a/msgraph/generated/device_management/device_compliance_policies/device_compliance_policies_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/device_compliance_policies_request_builder.py @@ -48,10 +48,10 @@ def by_device_compliance_policy_id(self,device_compliance_policy_id: str) -> Dev async def get(self,request_configuration: Optional[RequestConfiguration[DeviceCompliancePoliciesRequestBuilderGetQueryParameters]] = None) -> Optional[DeviceCompliancePolicyCollectionResponse]: """ - List properties and relationships of the macOSCompliancePolicy objects. + List properties and relationships of the windows81CompliancePolicy objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceCompliancePolicyCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-macoscompliancepolicy-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows81compliancepolicy-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -69,11 +69,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[DeviceCo async def post(self,body: DeviceCompliancePolicy, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DeviceCompliancePolicy]: """ - Create a new windows10MobileCompliancePolicy object. + Create a new windows81CompliancePolicy object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceCompliancePolicy] - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows10mobilecompliancepolicy-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows81compliancepolicy-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,7 +93,7 @@ async def post(self,body: DeviceCompliancePolicy, request_configuration: Optiona def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeviceCompliancePoliciesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - List properties and relationships of the macOSCompliancePolicy objects. + List properties and relationships of the windows81CompliancePolicy objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -104,7 +104,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_post_request_information(self,body: DeviceCompliancePolicy, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Create a new windows10MobileCompliancePolicy object. + Create a new windows81CompliancePolicy object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -139,7 +139,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DeviceCompliancePoliciesRequestBuilderGetQueryParameters(): """ - List properties and relationships of the macOSCompliancePolicy objects. + List properties and relationships of the windows81CompliancePolicy objects. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.py b/msgraph/generated/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.py index 1229003dc0c..850c6ab8a84 100644 --- a/msgraph/generated/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.py +++ b/msgraph/generated/device_management/device_compliance_policies/item/device_compliance_policy_item_request_builder.py @@ -40,10 +40,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: """ - Deletes a iosCompliancePolicy. + Deletes a windows10MobileCompliancePolicy. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-ioscompliancepolicy-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows10mobilecompliancepolicy-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -59,10 +59,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[DeviceCompliancePolicyItemRequestBuilderGetQueryParameters]] = None) -> Optional[DeviceCompliancePolicy]: """ - Read properties and relationships of the windows81CompliancePolicy object. + Read properties and relationships of the androidWorkProfileCompliancePolicy object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceCompliancePolicy] - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows81compliancepolicy-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-androidworkprofilecompliancepolicy-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -80,11 +80,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[DeviceCo async def patch(self,body: DeviceCompliancePolicy, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DeviceCompliancePolicy]: """ - Update the properties of a androidWorkProfileCompliancePolicy object. + Update the properties of a windows10MobileCompliancePolicy object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceCompliancePolicy] - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-androidworkprofilecompliancepolicy-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows10mobilecompliancepolicy-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -104,7 +104,7 @@ async def patch(self,body: DeviceCompliancePolicy, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Deletes a iosCompliancePolicy. + Deletes a windows10MobileCompliancePolicy. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -115,7 +115,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeviceCompliancePolicyItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read properties and relationships of the windows81CompliancePolicy object. + Read properties and relationships of the androidWorkProfileCompliancePolicy object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -126,7 +126,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_patch_request_information(self,body: DeviceCompliancePolicy, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Update the properties of a androidWorkProfileCompliancePolicy object. + Update the properties of a windows10MobileCompliancePolicy object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -240,7 +240,7 @@ class DeviceCompliancePolicyItemRequestBuilderDeleteRequestConfiguration(Request @dataclass class DeviceCompliancePolicyItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the windows81CompliancePolicy object. + Read properties and relationships of the androidWorkProfileCompliancePolicy object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_management/device_configurations/device_configurations_request_builder.py b/msgraph/generated/device_management/device_configurations/device_configurations_request_builder.py index eb8a4107a23..f91cd80de60 100644 --- a/msgraph/generated/device_management/device_configurations/device_configurations_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/device_configurations_request_builder.py @@ -48,10 +48,10 @@ def by_device_configuration_id(self,device_configuration_id: str) -> DeviceConfi async def get(self,request_configuration: Optional[RequestConfiguration[DeviceConfigurationsRequestBuilderGetQueryParameters]] = None) -> Optional[DeviceConfigurationCollectionResponse]: """ - List properties and relationships of the macOSGeneralDeviceConfiguration objects. + List properties and relationships of the macOSDeviceFeaturesConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceConfigurationCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-macosgeneraldeviceconfiguration-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-macosdevicefeaturesconfiguration-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -69,11 +69,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[DeviceCo async def post(self,body: DeviceConfiguration, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DeviceConfiguration]: """ - Create a new windows10CustomConfiguration object. + Create a new windowsPhone81GeneralConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceConfiguration] - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows10customconfiguration-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windowsphone81generalconfiguration-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,7 +93,7 @@ async def post(self,body: DeviceConfiguration, request_configuration: Optional[R def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeviceConfigurationsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - List properties and relationships of the macOSGeneralDeviceConfiguration objects. + List properties and relationships of the macOSDeviceFeaturesConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -104,7 +104,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_post_request_information(self,body: DeviceConfiguration, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Create a new windows10CustomConfiguration object. + Create a new windowsPhone81GeneralConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -139,7 +139,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DeviceConfigurationsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the macOSGeneralDeviceConfiguration objects. + List properties and relationships of the macOSDeviceFeaturesConfiguration objects. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_management/device_configurations/item/device_configuration_item_request_builder.py b/msgraph/generated/device_management/device_configurations/item/device_configuration_item_request_builder.py index 5442f8885cc..66b04625fd1 100644 --- a/msgraph/generated/device_management/device_configurations/item/device_configuration_item_request_builder.py +++ b/msgraph/generated/device_management/device_configurations/item/device_configuration_item_request_builder.py @@ -39,10 +39,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: """ - Deletes a iosDeviceFeaturesConfiguration. + Deletes a iosCustomConfiguration. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-iosdevicefeaturesconfiguration-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-ioscustomconfiguration-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -58,10 +58,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[DeviceConfigurationItemRequestBuilderGetQueryParameters]] = None) -> Optional[DeviceConfiguration]: """ - Read properties and relationships of the androidCustomConfiguration object. + Read properties and relationships of the windows10GeneralConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceConfiguration] - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-androidcustomconfiguration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windows10generalconfiguration-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -91,11 +91,11 @@ def get_oma_setting_plain_text_value_with_secret_reference_value_id(self,secret_ async def patch(self,body: DeviceConfiguration, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DeviceConfiguration]: """ - Update the properties of a androidWorkProfileCustomConfiguration object. + Update the properties of a windowsDefenderAdvancedThreatProtectionConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceConfiguration] - Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-androidworkprofilecustomconfiguration-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-deviceconfig-windowsdefenderadvancedthreatprotectionconfiguration-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -115,7 +115,7 @@ async def patch(self,body: DeviceConfiguration, request_configuration: Optional[ def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Deletes a iosDeviceFeaturesConfiguration. + Deletes a iosCustomConfiguration. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -126,7 +126,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeviceConfigurationItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read properties and relationships of the androidCustomConfiguration object. + Read properties and relationships of the windows10GeneralConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -137,7 +137,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_patch_request_information(self,body: DeviceConfiguration, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Update the properties of a androidWorkProfileCustomConfiguration object. + Update the properties of a windowsDefenderAdvancedThreatProtectionConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -233,7 +233,7 @@ class DeviceConfigurationItemRequestBuilderDeleteRequestConfiguration(RequestCon @dataclass class DeviceConfigurationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the androidCustomConfiguration object. + Read properties and relationships of the windows10GeneralConfiguration object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.py b/msgraph/generated/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.py index 9ad8d24afcc..b19c6013d88 100644 --- a/msgraph/generated/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.py +++ b/msgraph/generated/device_management/device_enrollment_configurations/device_enrollment_configurations_request_builder.py @@ -48,10 +48,10 @@ def by_device_enrollment_configuration_id(self,device_enrollment_configuration_i async def get(self,request_configuration: Optional[RequestConfiguration[DeviceEnrollmentConfigurationsRequestBuilderGetQueryParameters]] = None) -> Optional[DeviceEnrollmentConfigurationCollectionResponse]: """ - List properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration objects. + List properties and relationships of the deviceEnrollmentLimitConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceEnrollmentConfigurationCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentplatformrestrictionsconfiguration-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentlimitconfiguration-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -69,11 +69,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[DeviceEn async def post(self,body: DeviceEnrollmentConfiguration, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DeviceEnrollmentConfiguration]: """ - Create a new deviceEnrollmentLimitConfiguration object. + Create a new deviceEnrollmentPlatformRestrictionsConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceEnrollmentConfiguration] - Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentlimitconfiguration-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentplatformrestrictionsconfiguration-create?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -93,7 +93,7 @@ async def post(self,body: DeviceEnrollmentConfiguration, request_configuration: def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeviceEnrollmentConfigurationsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - List properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration objects. + List properties and relationships of the deviceEnrollmentLimitConfiguration objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -104,7 +104,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_post_request_information(self,body: DeviceEnrollmentConfiguration, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Create a new deviceEnrollmentLimitConfiguration object. + Create a new deviceEnrollmentPlatformRestrictionsConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -139,7 +139,7 @@ def count(self) -> CountRequestBuilder: @dataclass class DeviceEnrollmentConfigurationsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the deviceEnrollmentPlatformRestrictionsConfiguration objects. + List properties and relationships of the deviceEnrollmentLimitConfiguration objects. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.py b/msgraph/generated/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.py index 5db6a50fbf1..616e28b40e8 100644 --- a/msgraph/generated/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.py +++ b/msgraph/generated/device_management/device_enrollment_configurations/item/device_enrollment_configuration_item_request_builder.py @@ -34,10 +34,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: """ - Deletes a deviceEnrollmentWindowsHelloForBusinessConfiguration. + Deletes a deviceEnrollmentPlatformRestrictionsConfiguration. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None - Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentwindowshelloforbusinessconfiguration-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentplatformrestrictionsconfiguration-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -53,10 +53,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[DeviceEnrollmentConfigurationItemRequestBuilderGetQueryParameters]] = None) -> Optional[DeviceEnrollmentConfiguration]: """ - Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. + Read properties and relationships of the deviceEnrollmentLimitConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceEnrollmentConfiguration] - Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentwindowshelloforbusinessconfiguration-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentlimitconfiguration-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -74,11 +74,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[DeviceEn async def patch(self,body: DeviceEnrollmentConfiguration, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DeviceEnrollmentConfiguration]: """ - Update the properties of a deviceEnrollmentLimitConfiguration object. + Update the properties of a deviceEnrollmentPlatformRestrictionsConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceEnrollmentConfiguration] - Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentlimitconfiguration-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-deviceenrollmentplatformrestrictionsconfiguration-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -98,7 +98,7 @@ async def patch(self,body: DeviceEnrollmentConfiguration, request_configuration: def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Deletes a deviceEnrollmentWindowsHelloForBusinessConfiguration. + Deletes a deviceEnrollmentPlatformRestrictionsConfiguration. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -109,7 +109,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeviceEnrollmentConfigurationItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. + Read properties and relationships of the deviceEnrollmentLimitConfiguration object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -120,7 +120,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_patch_request_information(self,body: DeviceEnrollmentConfiguration, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Update the properties of a deviceEnrollmentLimitConfiguration object. + Update the properties of a deviceEnrollmentPlatformRestrictionsConfiguration object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -180,7 +180,7 @@ class DeviceEnrollmentConfigurationItemRequestBuilderDeleteRequestConfiguration( @dataclass class DeviceEnrollmentConfigurationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the deviceEnrollmentWindowsHelloForBusinessConfiguration object. + Read properties and relationships of the deviceEnrollmentLimitConfiguration object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_management/device_management_request_builder.py b/msgraph/generated/device_management/device_management_request_builder.py index 98b42af3171..70bd9dd9987 100644 --- a/msgraph/generated/device_management/device_management_request_builder.py +++ b/msgraph/generated/device_management/device_management_request_builder.py @@ -95,7 +95,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[DeviceMa Read properties and relationships of the deviceManagement object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceManagement] - Find more info here: https://learn.microsoft.com/graph/api/intune-remoteassistance-devicemanagement-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-gpanalyticsservice-devicemanagement-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -129,7 +129,7 @@ async def patch(self,body: DeviceManagement, request_configuration: Optional[Req param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[DeviceManagement] - Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-devicemanagement-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-rbac-devicemanagement-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") diff --git a/msgraph/generated/device_management/role_definitions/item/role_definition_item_request_builder.py b/msgraph/generated/device_management/role_definitions/item/role_definition_item_request_builder.py index 3757927f4a7..16865ecaf54 100644 --- a/msgraph/generated/device_management/role_definitions/item/role_definition_item_request_builder.py +++ b/msgraph/generated/device_management/role_definitions/item/role_definition_item_request_builder.py @@ -51,10 +51,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[RoleDefinitionItemRequestBuilderGetQueryParameters]] = None) -> Optional[RoleDefinition]: """ - Read properties and relationships of the deviceAndAppManagementRoleDefinition object. + Read properties and relationships of the roleDefinition object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RoleDefinition] - Find more info here: https://learn.microsoft.com/graph/api/intune-rbac-deviceandappmanagementroledefinition-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-rbac-roledefinition-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -107,7 +107,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RoleDefinitionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read properties and relationships of the deviceAndAppManagementRoleDefinition object. + Read properties and relationships of the roleDefinition object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -160,7 +160,7 @@ class RoleDefinitionItemRequestBuilderDeleteRequestConfiguration(RequestConfigur @dataclass class RoleDefinitionItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the deviceAndAppManagementRoleDefinition object. + Read properties and relationships of the roleDefinition object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/device_management/role_definitions/role_definitions_request_builder.py b/msgraph/generated/device_management/role_definitions/role_definitions_request_builder.py index 3ed7dc6b874..354a738d189 100644 --- a/msgraph/generated/device_management/role_definitions/role_definitions_request_builder.py +++ b/msgraph/generated/device_management/role_definitions/role_definitions_request_builder.py @@ -48,10 +48,10 @@ def by_role_definition_id(self,role_definition_id: str) -> RoleDefinitionItemReq async def get(self,request_configuration: Optional[RequestConfiguration[RoleDefinitionsRequestBuilderGetQueryParameters]] = None) -> Optional[RoleDefinitionCollectionResponse]: """ - List properties and relationships of the roleDefinition objects. + List properties and relationships of the deviceAndAppManagementRoleDefinition objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[RoleDefinitionCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-rbac-roledefinition-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-rbac-deviceandappmanagementroledefinition-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -93,7 +93,7 @@ async def post(self,body: RoleDefinition, request_configuration: Optional[Reques def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RoleDefinitionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - List properties and relationships of the roleDefinition objects. + List properties and relationships of the deviceAndAppManagementRoleDefinition objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -139,7 +139,7 @@ def count(self) -> CountRequestBuilder: @dataclass class RoleDefinitionsRequestBuilderGetQueryParameters(): """ - List properties and relationships of the roleDefinition objects. + List properties and relationships of the deviceAndAppManagementRoleDefinition objects. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/drives/item/items/item/retention_label/retention_label_request_builder.py b/msgraph/generated/drives/item/items/item/retention_label/retention_label_request_builder.py index 602cce5fcf1..7d74a151c4a 100644 --- a/msgraph/generated/drives/item/items/item/retention_label/retention_label_request_builder.py +++ b/msgraph/generated/drives/item/items/item/retention_label/retention_label_request_builder.py @@ -70,11 +70,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Retentio async def patch(self,body: ItemRetentionLabel, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ItemRetentionLabel]: """ - Lock or unlock a retention label on a driveItem that classifies content as records. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. For more information about how you can lock and unlock retention labels, see Use record versioning to update records stored in SharePoint or OneDrive. + Apply (set) a retention label on a driveItem (files and folders). Retention labels don't need to be published in a retention label policy to be applied using this method. When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label. For information about conflict resolution for retention labels, see Will an existing label be overridden or removed. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ItemRetentionLabel] - Find more info here: https://learn.microsoft.com/graph/api/driveitem-lockorunlockrecord?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/driveitem-setretentionlabel?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -116,7 +116,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_patch_request_information(self,body: ItemRetentionLabel, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Lock or unlock a retention label on a driveItem that classifies content as records. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. For more information about how you can lock and unlock retention labels, see Use record versioning to update records stored in SharePoint or OneDrive. + Apply (set) a retention label on a driveItem (files and folders). Retention labels don't need to be published in a retention label policy to be applied using this method. When a retention label is applied to a folder, all the items in the folder are tagged with the same retention label. For information about conflict resolution for retention labels, see Will an existing label be overridden or removed. For information about retention labels from an administrator's perspective, see Use retention labels to manage the lifecycle of documents stored in SharePoint. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation diff --git a/msgraph/generated/drives/item/items/item/workbook/names/item/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/names/item/range/range_request_builder.py index 48ca809eb22..b35b840a070 100644 --- a/msgraph/generated/drives/item/items/item/workbook/names/item/range/range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/names/item/range/range_request_builder.py @@ -31,10 +31,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: """ - Retrieve the properties and relationships of range object. + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookRange] - Find more info here: https://learn.microsoft.com/graph/api/range-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/nameditem-range?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -52,7 +52,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[QueryPar def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Retrieve the properties and relationships of range object. + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ diff --git a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/range/range_request_builder.py b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/range/range_request_builder.py index ac878adee34..0d02a2466d6 100644 --- a/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/range/range_request_builder.py +++ b/msgraph/generated/drives/item/items/item/workbook/worksheets/item/names/item/range/range_request_builder.py @@ -31,10 +31,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: """ - Retrieve the properties and relationships of range object. + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[WorkbookRange] - Find more info here: https://learn.microsoft.com/graph/api/range-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/nameditem-range?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -52,7 +52,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[QueryPar def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Retrieve the properties and relationships of range object. + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ diff --git a/msgraph/generated/education/classes/item/assignments/assignments_request_builder.py b/msgraph/generated/education/classes/item/assignments/assignments_request_builder.py index 0e6cf0c2214..a7f9fa51eca 100644 --- a/msgraph/generated/education/classes/item/assignments/assignments_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/assignments_request_builder.py @@ -70,7 +70,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Assignme async def post(self,body: EducationAssignment, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[EducationAssignment]: """ - Create a new assignment. Only teachers in a class can create an assignment. Assignments start in the Draft state, which means that students will not see the assignment until publication. + Create a new assignment. Only teachers in a class can create an assignment. Assignments start in draft status, which means that students can't see the assignment until it's published. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] @@ -105,7 +105,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_post_request_information(self,body: EducationAssignment, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Create a new assignment. Only teachers in a class can create an assignment. Assignments start in the Draft state, which means that students will not see the assignment until publication. + Create a new assignment. Only teachers in a class can create an assignment. Assignments start in draft status, which means that students can't see the assignment until it's published. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation diff --git a/msgraph/generated/education/classes/item/assignments/item/publish/publish_request_builder.py b/msgraph/generated/education/classes/item/assignments/item/publish/publish_request_builder.py index 9d914b7da4a..fe4949d543c 100644 --- a/msgraph/generated/education/classes/item/assignments/item/publish/publish_request_builder.py +++ b/msgraph/generated/education/classes/item/assignments/item/publish/publish_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[EducationAssignment]: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the status of an educationAssignment from its original draft status to the published status. You can change the status from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The status of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-publish?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def post(self,request_configuration: Optional[RequestConfiguration[QueryPa def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the status of an educationAssignment from its original draft status to the published status. You can change the status from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The status of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ diff --git a/msgraph/generated/education/me/assignments/item/publish/publish_request_builder.py b/msgraph/generated/education/me/assignments/item/publish/publish_request_builder.py index 221682ffb81..63df1b06114 100644 --- a/msgraph/generated/education/me/assignments/item/publish/publish_request_builder.py +++ b/msgraph/generated/education/me/assignments/item/publish/publish_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[EducationAssignment]: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the status of an educationAssignment from its original draft status to the published status. You can change the status from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The status of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-publish?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def post(self,request_configuration: Optional[RequestConfiguration[QueryPa def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the status of an educationAssignment from its original draft status to the published status. You can change the status from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The status of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ diff --git a/msgraph/generated/education/users/item/assignments/item/publish/publish_request_builder.py b/msgraph/generated/education/users/item/assignments/item/publish/publish_request_builder.py index b031fae3c01..1d6aa4b64e4 100644 --- a/msgraph/generated/education/users/item/assignments/item/publish/publish_request_builder.py +++ b/msgraph/generated/education/users/item/assignments/item/publish/publish_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[EducationAssignment]: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the status of an educationAssignment from its original draft status to the published status. You can change the status from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The status of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[EducationAssignment] Find more info here: https://learn.microsoft.com/graph/api/educationassignment-publish?view=graph-rest-1.0 @@ -52,7 +52,7 @@ async def post(self,request_configuration: Optional[RequestConfiguration[QueryPa def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Publish an education assignment. Change the state of an educationAssignment from its original draft status to the published status. You can change the state from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The state of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. + Publish an education assignment. Change the status of an educationAssignment from its original draft status to the published status. You can change the status from draft to scheduled if the assignment is scheduled for a future date. Only a teacher in the class can make this call. When an assignment is in draft status, students will not see the assignment, nor will there be any submission objects. Calling this API creates educationSubmission objects and displays the assignment in each student's list. The status of the assignment goes back to draft if there is any backend failure during publish process. To update the properties of a published assignment, see update an assignment. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ diff --git a/msgraph/generated/groups/item/conversations/conversations_request_builder.py b/msgraph/generated/groups/item/conversations/conversations_request_builder.py index 48d63c8cd3a..58e5fd5444f 100644 --- a/msgraph/generated/groups/item/conversations/conversations_request_builder.py +++ b/msgraph/generated/groups/item/conversations/conversations_request_builder.py @@ -69,11 +69,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Conversa async def post(self,body: Conversation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Conversation]: """ - Use reply thread or reply post to further post to that conversation. + Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Conversation] - Find more info here: https://learn.microsoft.com/graph/api/group-post-conversations?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/opentypeextension-post-opentypeextension?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -104,7 +104,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_post_request_information(self,body: Conversation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Use reply thread or reply post to further post to that conversation. + Create an open extension (openTypeExtension object) and add custom properties in a new or existing instance of a resource. You can create an open extension in a resource instance and store custom data to it all in the same operation, except for specific resources. The table in the Permissions section lists the resources that support open extensions. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation diff --git a/msgraph/generated/groups/item/conversations/item/conversation_item_request_builder.py b/msgraph/generated/groups/item/conversations/item/conversation_item_request_builder.py index e0f1e1c093b..f7f9bdc9bf5 100644 --- a/msgraph/generated/groups/item/conversations/item/conversation_item_request_builder.py +++ b/msgraph/generated/groups/item/conversations/item/conversation_item_request_builder.py @@ -35,7 +35,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query Delete conversation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None - Find more info here: https://learn.microsoft.com/graph/api/group-delete-conversation?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversation-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -51,10 +51,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[ConversationItemRequestBuilderGetQueryParameters]] = None) -> Optional[Conversation]: """ - Retrieve the properties and relationships of conversation object. + The group's conversations. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Conversation] - Find more info here: https://learn.microsoft.com/graph/api/conversation-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/group-get-conversation?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -83,7 +83,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ConversationItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Retrieve the properties and relationships of conversation object. + The group's conversations. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -121,7 +121,7 @@ class ConversationItemRequestBuilderDeleteRequestConfiguration(RequestConfigurat @dataclass class ConversationItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of conversation object. + The group's conversations. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/groups/item/threads/item/conversation_thread_item_request_builder.py b/msgraph/generated/groups/item/threads/item/conversation_thread_item_request_builder.py index 16d0342ed84..2c18f559046 100644 --- a/msgraph/generated/groups/item/threads/item/conversation_thread_item_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/conversation_thread_item_request_builder.py @@ -36,7 +36,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query Delete conversationThread. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None - Find more info here: https://learn.microsoft.com/graph/api/group-delete-thread?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationthread-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -52,10 +52,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[ConversationThreadItemRequestBuilderGetQueryParameters]] = None) -> Optional[ConversationThread]: """ - Get a thread object. + Get a specific thread that belongs to a group. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationThread] - Find more info here: https://learn.microsoft.com/graph/api/group-get-thread?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationthread-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -108,7 +108,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ConversationThreadItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Get a thread object. + Get a specific thread that belongs to a group. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -170,7 +170,7 @@ class ConversationThreadItemRequestBuilderDeleteRequestConfiguration(RequestConf @dataclass class ConversationThreadItemRequestBuilderGetQueryParameters(): """ - Get a thread object. + Get a specific thread that belongs to a group. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/groups/item/threads/item/posts/posts_request_builder.py b/msgraph/generated/groups/item/threads/item/posts/posts_request_builder.py index d47145eae28..3a8b64b8654 100644 --- a/msgraph/generated/groups/item/threads/item/posts/posts_request_builder.py +++ b/msgraph/generated/groups/item/threads/item/posts/posts_request_builder.py @@ -47,10 +47,10 @@ def by_post_id(self,post_id: str) -> PostItemRequestBuilder: async def get(self,request_configuration: Optional[RequestConfiguration[PostsRequestBuilderGetQueryParameters]] = None) -> Optional[PostCollectionResponse]: """ - Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the post resource supports extensions, you can also use the GET operation to get custom properties and extension data in a post instance. + Get the posts of the specified thread. You can specify both the parent conversation and the thread, or,you can specify the thread without referencing the parent conversation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PostCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/post-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationthread-list-posts?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -68,7 +68,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[PostsReq def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PostsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the post resource supports extensions, you can also use the GET operation to get custom properties and extension data in a post instance. + Get the posts of the specified thread. You can specify both the parent conversation and the thread, or,you can specify the thread without referencing the parent conversation. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -99,7 +99,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PostsRequestBuilderGetQueryParameters(): """ - Get the properties and relationships of a post in a specified thread. You can specify both the parent conversation and the thread, or, you can specify the thread without referencing the parent conversation. Since the post resource supports extensions, you can also use the GET operation to get custom properties and extension data in a post instance. + Get the posts of the specified thread. You can specify both the parent conversation and the thread, or,you can specify the thread without referencing the parent conversation. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/identity/authentication_events_flows/authentication_events_flows_request_builder.py b/msgraph/generated/identity/authentication_events_flows/authentication_events_flows_request_builder.py new file mode 100644 index 00000000000..7fd6c1023cb --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/authentication_events_flows_request_builder.py @@ -0,0 +1,219 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...models.authentication_events_flow import AuthenticationEventsFlow + from ...models.authentication_events_flow_collection_response import AuthenticationEventsFlowCollectionResponse + from ...models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .graph_external_users_self_service_sign_up_events_flow.graph_external_users_self_service_sign_up_events_flow_request_builder import GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder + from .item.authentication_events_flow_item_request_builder import AuthenticationEventsFlowItemRequestBuilder + +class AuthenticationEventsFlowsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the authenticationEventsFlows property of the microsoft.graph.identityContainer entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AuthenticationEventsFlowsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_authentication_events_flow_id(self,authentication_events_flow_id: str) -> AuthenticationEventsFlowItemRequestBuilder: + """ + Provides operations to manage the authenticationEventsFlows property of the microsoft.graph.identityContainer entity. + param authentication_events_flow_id: The unique identifier of authenticationEventsFlow + Returns: AuthenticationEventsFlowItemRequestBuilder + """ + if not authentication_events_flow_id: + raise TypeError("authentication_events_flow_id cannot be null.") + from .item.authentication_events_flow_item_request_builder import AuthenticationEventsFlowItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["authenticationEventsFlow%2Did"] = authentication_events_flow_id + return AuthenticationEventsFlowItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[AuthenticationEventsFlowsRequestBuilderGetQueryParameters]] = None) -> Optional[AuthenticationEventsFlowCollectionResponse]: + """ + Get a collection of authentication events policies that are derived from authenticationEventsFlow. The following derived subtypes are supported: - externalUsersSelfServiceSignupEventsFlow + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationEventsFlowCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/identitycontainer-list-authenticationeventsflows?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...models.authentication_events_flow_collection_response import AuthenticationEventsFlowCollectionResponse + + return await self.request_adapter.send_async(request_info, AuthenticationEventsFlowCollectionResponse, error_mapping) + + async def post(self,body: AuthenticationEventsFlow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[AuthenticationEventsFlow]: + """ + Create a new authenticationEventsFlow object that is of the type specified in the request body. The following derived subtypes are supported:- externalUsersSelfServiceSignupEventsFlow object type. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationEventsFlow] + Find more info here: https://learn.microsoft.com/graph/api/identitycontainer-post-authenticationeventsflows?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...models.authentication_events_flow import AuthenticationEventsFlow + + return await self.request_adapter.send_async(request_info, AuthenticationEventsFlow, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AuthenticationEventsFlowsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get a collection of authentication events policies that are derived from authenticationEventsFlow. The following derived subtypes are supported: - externalUsersSelfServiceSignupEventsFlow + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: AuthenticationEventsFlow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create a new authenticationEventsFlow object that is of the type specified in the request body. The following derived subtypes are supported:- externalUsersSelfServiceSignupEventsFlow object type. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AuthenticationEventsFlowsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AuthenticationEventsFlowsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AuthenticationEventsFlowsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def graph_external_users_self_service_sign_up_events_flow(self) -> GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder: + """ + Casts the previous resource to externalUsersSelfServiceSignUpEventsFlow. + """ + from .graph_external_users_self_service_sign_up_events_flow.graph_external_users_self_service_sign_up_events_flow_request_builder import GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder + + return GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AuthenticationEventsFlowsRequestBuilderGetQueryParameters(): + """ + Get a collection of authentication events policies that are derived from authenticationEventsFlow. The following derived subtypes are supported: - externalUsersSelfServiceSignupEventsFlow + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class AuthenticationEventsFlowsRequestBuilderGetRequestConfiguration(RequestConfiguration[AuthenticationEventsFlowsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AuthenticationEventsFlowsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/count/count_request_builder.py b/msgraph/generated/identity/authentication_events_flows/count/count_request_builder.py new file mode 100644 index 00000000000..5780d5afa71 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ....models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/graph_external_users_self_service_sign_up_events_flow/count/count_request_builder.py b/msgraph/generated/identity/authentication_events_flows/graph_external_users_self_service_sign_up_events_flow/count/count_request_builder.py new file mode 100644 index 00000000000..0e5f8172f53 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/graph_external_users_self_service_sign_up_events_flow/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .....models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/graph.externalUsersSelfServiceSignUpEventsFlow/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/graph_external_users_self_service_sign_up_events_flow/graph_external_users_self_service_sign_up_events_flow_request_builder.py b/msgraph/generated/identity/authentication_events_flows/graph_external_users_self_service_sign_up_events_flow/graph_external_users_self_service_sign_up_events_flow_request_builder.py new file mode 100644 index 00000000000..c69b2631b0e --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/graph_external_users_self_service_sign_up_events_flow/graph_external_users_self_service_sign_up_events_flow_request_builder.py @@ -0,0 +1,146 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ....models.external_users_self_service_sign_up_events_flow_collection_response import ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse + from ....models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + +class GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder(BaseRequestBuilder): + """ + Casts the previous resource to externalUsersSelfServiceSignUpEventsFlow. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/graph.externalUsersSelfServiceSignUpEventsFlow{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilderGetQueryParameters]] = None) -> Optional[ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse]: + """ + Get the items of type microsoft.graph.externalUsersSelfServiceSignUpEventsFlow in the microsoft.graph.authenticationEventsFlow collection + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ....models.external_users_self_service_sign_up_events_flow_collection_response import ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse + + return await self.request_adapter.send_async(request_info, ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the items of type microsoft.graph.externalUsersSelfServiceSignUpEventsFlow in the microsoft.graph.authenticationEventsFlow collection + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilderGetQueryParameters(): + """ + Get the items of type microsoft.graph.externalUsersSelfServiceSignUpEventsFlow in the microsoft.graph.authenticationEventsFlow collection + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilderGetRequestConfiguration(RequestConfiguration[GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/authentication_events_flow_item_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/authentication_events_flow_item_request_builder.py new file mode 100644 index 00000000000..74c94fbf6f6 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/authentication_events_flow_item_request_builder.py @@ -0,0 +1,210 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ....models.authentication_events_flow import AuthenticationEventsFlow + from ....models.o_data_errors.o_data_error import ODataError + from .conditions.conditions_request_builder import ConditionsRequestBuilder + from .graph_external_users_self_service_sign_up_events_flow.graph_external_users_self_service_sign_up_events_flow_request_builder import GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder + +class AuthenticationEventsFlowItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the authenticationEventsFlows property of the microsoft.graph.identityContainer entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AuthenticationEventsFlowItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete a specific authenticationEventsFlow resource by ID. This operation also removes or unlinks all applications from the flow, which disables the customized authentication experience defined for the application. The following derived subtypes are supported:- externalUsersSelfServiceSignupEventsFlow + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/authenticationeventsflow-delete?view=graph-rest-1.0 + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[AuthenticationEventsFlowItemRequestBuilderGetQueryParameters]] = None) -> Optional[AuthenticationEventsFlow]: + """ + Retrieve the properties and relationships of a specific authenticationEventsFlow object by ID. The @odata.type property in the response object indicates the type of the object, which can be one of the following derived subtypes:- externalUsersSelfServiceSignupEventsFlow + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationEventsFlow] + Find more info here: https://learn.microsoft.com/graph/api/authenticationeventsflow-get?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ....models.authentication_events_flow import AuthenticationEventsFlow + + return await self.request_adapter.send_async(request_info, AuthenticationEventsFlow, error_mapping) + + async def patch(self,body: AuthenticationEventsFlow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[AuthenticationEventsFlow]: + """ + Update the properties of an authenticationEventsFlow object by ID. You must specify the @odata.type property and the value of the authenticationEventsFlow object type to update. The following derived subtypes are supported:- externalUsersSelfServiceSignupEventsFlow + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationEventsFlow] + Find more info here: https://learn.microsoft.com/graph/api/authenticationeventsflow-update?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ....models.authentication_events_flow import AuthenticationEventsFlow + + return await self.request_adapter.send_async(request_info, AuthenticationEventsFlow, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete a specific authenticationEventsFlow resource by ID. This operation also removes or unlinks all applications from the flow, which disables the customized authentication experience defined for the application. The following derived subtypes are supported:- externalUsersSelfServiceSignupEventsFlow + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AuthenticationEventsFlowItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Retrieve the properties and relationships of a specific authenticationEventsFlow object by ID. The @odata.type property in the response object indicates the type of the object, which can be one of the following derived subtypes:- externalUsersSelfServiceSignupEventsFlow + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: AuthenticationEventsFlow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the properties of an authenticationEventsFlow object by ID. You must specify the @odata.type property and the value of the authenticationEventsFlow object type to update. The following derived subtypes are supported:- externalUsersSelfServiceSignupEventsFlow + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AuthenticationEventsFlowItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AuthenticationEventsFlowItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AuthenticationEventsFlowItemRequestBuilder(self.request_adapter, raw_url) + + @property + def conditions(self) -> ConditionsRequestBuilder: + """ + The conditions property + """ + from .conditions.conditions_request_builder import ConditionsRequestBuilder + + return ConditionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def graph_external_users_self_service_sign_up_events_flow(self) -> GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder: + """ + Casts the previous resource to externalUsersSelfServiceSignUpEventsFlow. + """ + from .graph_external_users_self_service_sign_up_events_flow.graph_external_users_self_service_sign_up_events_flow_request_builder import GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder + + return GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AuthenticationEventsFlowItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AuthenticationEventsFlowItemRequestBuilderGetQueryParameters(): + """ + Retrieve the properties and relationships of a specific authenticationEventsFlow object by ID. The @odata.type property in the response object indicates the type of the object, which can be one of the following derived subtypes:- externalUsersSelfServiceSignupEventsFlow + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class AuthenticationEventsFlowItemRequestBuilderGetRequestConfiguration(RequestConfiguration[AuthenticationEventsFlowItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AuthenticationEventsFlowItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/applications_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/applications_request_builder.py new file mode 100644 index 00000000000..be771a683f8 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/applications_request_builder.py @@ -0,0 +1,32 @@ +from __future__ import annotations +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.request_adapter import RequestAdapter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .include_applications.include_applications_request_builder import IncludeApplicationsRequestBuilder + +class ApplicationsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identity/authenticationEventsFlows/{authenticationEventsFlow-id}/conditions/applications + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplicationsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/conditions/applications", path_parameters) + + @property + def include_applications(self) -> IncludeApplicationsRequestBuilder: + """ + Provides operations to manage the includeApplications property of the microsoft.graph.authenticationConditionsApplications entity. + """ + from .include_applications.include_applications_request_builder import IncludeApplicationsRequestBuilder + + return IncludeApplicationsRequestBuilder(self.request_adapter, self.path_parameters) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/count/count_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/count/count_request_builder.py new file mode 100644 index 00000000000..d7475423abd --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/conditions/applications/includeApplications/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/include_applications_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/include_applications_request_builder.py new file mode 100644 index 00000000000..f79f0979e3f --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/include_applications_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.authentication_condition_application import AuthenticationConditionApplication + from .......models.authentication_condition_application_collection_response import AuthenticationConditionApplicationCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.authentication_condition_application_app_item_request_builder import AuthenticationConditionApplicationAppItemRequestBuilder + +class IncludeApplicationsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the includeApplications property of the microsoft.graph.authenticationConditionsApplications entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IncludeApplicationsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/conditions/applications/includeApplications{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_authentication_condition_application_app_id(self,authentication_condition_application_app_id: str) -> AuthenticationConditionApplicationAppItemRequestBuilder: + """ + Provides operations to manage the includeApplications property of the microsoft.graph.authenticationConditionsApplications entity. + param authentication_condition_application_app_id: The unique identifier of authenticationConditionApplication + Returns: AuthenticationConditionApplicationAppItemRequestBuilder + """ + if not authentication_condition_application_app_id: + raise TypeError("authentication_condition_application_app_id cannot be null.") + from .item.authentication_condition_application_app_item_request_builder import AuthenticationConditionApplicationAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["authenticationConditionApplication%2DappId"] = authentication_condition_application_app_id + return AuthenticationConditionApplicationAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[IncludeApplicationsRequestBuilderGetQueryParameters]] = None) -> Optional[AuthenticationConditionApplicationCollectionResponse]: + """ + Get includeApplications from identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationConditionApplicationCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.authentication_condition_application_collection_response import AuthenticationConditionApplicationCollectionResponse + + return await self.request_adapter.send_async(request_info, AuthenticationConditionApplicationCollectionResponse, error_mapping) + + async def post(self,body: AuthenticationConditionApplication, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[AuthenticationConditionApplication]: + """ + Create new navigation property to includeApplications for identity + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationConditionApplication] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.authentication_condition_application import AuthenticationConditionApplication + + return await self.request_adapter.send_async(request_info, AuthenticationConditionApplication, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[IncludeApplicationsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get includeApplications from identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: AuthenticationConditionApplication, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to includeApplications for identity + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IncludeApplicationsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IncludeApplicationsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IncludeApplicationsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class IncludeApplicationsRequestBuilderGetQueryParameters(): + """ + Get includeApplications from identity + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class IncludeApplicationsRequestBuilderGetRequestConfiguration(RequestConfiguration[IncludeApplicationsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class IncludeApplicationsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/item/authentication_condition_application_app_item_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/item/authentication_condition_application_app_item_request_builder.py new file mode 100644 index 00000000000..4cca1372184 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/conditions/applications/include_applications/item/authentication_condition_application_app_item_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.authentication_condition_application import AuthenticationConditionApplication + from ........models.o_data_errors.o_data_error import ODataError + +class AuthenticationConditionApplicationAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the includeApplications property of the microsoft.graph.authenticationConditionsApplications entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AuthenticationConditionApplicationAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/conditions/applications/includeApplications/{authenticationConditionApplication%2DappId}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property includeApplications for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[AuthenticationConditionApplicationAppItemRequestBuilderGetQueryParameters]] = None) -> Optional[AuthenticationConditionApplication]: + """ + Get includeApplications from identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationConditionApplication] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.authentication_condition_application import AuthenticationConditionApplication + + return await self.request_adapter.send_async(request_info, AuthenticationConditionApplication, error_mapping) + + async def patch(self,body: AuthenticationConditionApplication, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[AuthenticationConditionApplication]: + """ + Update the navigation property includeApplications in identity + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationConditionApplication] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.authentication_condition_application import AuthenticationConditionApplication + + return await self.request_adapter.send_async(request_info, AuthenticationConditionApplication, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property includeApplications for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AuthenticationConditionApplicationAppItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get includeApplications from identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: AuthenticationConditionApplication, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property includeApplications in identity + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AuthenticationConditionApplicationAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AuthenticationConditionApplicationAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AuthenticationConditionApplicationAppItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AuthenticationConditionApplicationAppItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AuthenticationConditionApplicationAppItemRequestBuilderGetQueryParameters(): + """ + Get includeApplications from identity + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class AuthenticationConditionApplicationAppItemRequestBuilderGetRequestConfiguration(RequestConfiguration[AuthenticationConditionApplicationAppItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AuthenticationConditionApplicationAppItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/conditions/conditions_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/conditions/conditions_request_builder.py new file mode 100644 index 00000000000..55aae72ed59 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/conditions/conditions_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .....models.authentication_conditions import AuthenticationConditions + from .....models.o_data_errors.o_data_error import ODataError + from .applications.applications_request_builder import ApplicationsRequestBuilder + +class ConditionsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identity/authenticationEventsFlows/{authenticationEventsFlow-id}/conditions + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ConditionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/conditions{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ConditionsRequestBuilderGetQueryParameters]] = None) -> Optional[AuthenticationConditions]: + """ + The conditions representing the context of the authentication request that's used to decide whether the events policy is invoked. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationConditions] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.authentication_conditions import AuthenticationConditions + + return await self.request_adapter.send_async(request_info, AuthenticationConditions, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ConditionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The conditions representing the context of the authentication request that's used to decide whether the events policy is invoked. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ConditionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ConditionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ConditionsRequestBuilder(self.request_adapter, raw_url) + + @property + def applications(self) -> ApplicationsRequestBuilder: + """ + The applications property + """ + from .applications.applications_request_builder import ApplicationsRequestBuilder + + return ApplicationsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ConditionsRequestBuilderGetQueryParameters(): + """ + The conditions representing the context of the authentication request that's used to decide whether the events policy is invoked. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ConditionsRequestBuilderGetRequestConfiguration(RequestConfiguration[ConditionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/applications_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/applications_request_builder.py new file mode 100644 index 00000000000..6e62256dc9c --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/applications_request_builder.py @@ -0,0 +1,32 @@ +from __future__ import annotations +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.request_adapter import RequestAdapter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .include_applications.include_applications_request_builder import IncludeApplicationsRequestBuilder + +class ApplicationsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identity/authenticationEventsFlows/{authenticationEventsFlow-id}/graph.externalUsersSelfServiceSignUpEventsFlow/conditions/applications + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplicationsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/conditions/applications", path_parameters) + + @property + def include_applications(self) -> IncludeApplicationsRequestBuilder: + """ + Provides operations to manage the includeApplications property of the microsoft.graph.authenticationConditionsApplications entity. + """ + from .include_applications.include_applications_request_builder import IncludeApplicationsRequestBuilder + + return IncludeApplicationsRequestBuilder(self.request_adapter, self.path_parameters) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/count/count_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/count/count_request_builder.py new file mode 100644 index 00000000000..d57d0685fb8 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/conditions/applications/includeApplications/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/include_applications_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/include_applications_request_builder.py new file mode 100644 index 00000000000..493687e14ea --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/include_applications_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.authentication_condition_application import AuthenticationConditionApplication + from ........models.authentication_condition_application_collection_response import AuthenticationConditionApplicationCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.authentication_condition_application_app_item_request_builder import AuthenticationConditionApplicationAppItemRequestBuilder + +class IncludeApplicationsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the includeApplications property of the microsoft.graph.authenticationConditionsApplications entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IncludeApplicationsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/conditions/applications/includeApplications{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_authentication_condition_application_app_id(self,authentication_condition_application_app_id: str) -> AuthenticationConditionApplicationAppItemRequestBuilder: + """ + Provides operations to manage the includeApplications property of the microsoft.graph.authenticationConditionsApplications entity. + param authentication_condition_application_app_id: The unique identifier of authenticationConditionApplication + Returns: AuthenticationConditionApplicationAppItemRequestBuilder + """ + if not authentication_condition_application_app_id: + raise TypeError("authentication_condition_application_app_id cannot be null.") + from .item.authentication_condition_application_app_item_request_builder import AuthenticationConditionApplicationAppItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["authenticationConditionApplication%2DappId"] = authentication_condition_application_app_id + return AuthenticationConditionApplicationAppItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[IncludeApplicationsRequestBuilderGetQueryParameters]] = None) -> Optional[AuthenticationConditionApplicationCollectionResponse]: + """ + Get includeApplications from identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationConditionApplicationCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.authentication_condition_application_collection_response import AuthenticationConditionApplicationCollectionResponse + + return await self.request_adapter.send_async(request_info, AuthenticationConditionApplicationCollectionResponse, error_mapping) + + async def post(self,body: AuthenticationConditionApplication, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[AuthenticationConditionApplication]: + """ + Create new navigation property to includeApplications for identity + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationConditionApplication] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.authentication_condition_application import AuthenticationConditionApplication + + return await self.request_adapter.send_async(request_info, AuthenticationConditionApplication, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[IncludeApplicationsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get includeApplications from identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: AuthenticationConditionApplication, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to includeApplications for identity + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IncludeApplicationsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IncludeApplicationsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IncludeApplicationsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class IncludeApplicationsRequestBuilderGetQueryParameters(): + """ + Get includeApplications from identity + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class IncludeApplicationsRequestBuilderGetRequestConfiguration(RequestConfiguration[IncludeApplicationsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class IncludeApplicationsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/item/authentication_condition_application_app_item_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/item/authentication_condition_application_app_item_request_builder.py new file mode 100644 index 00000000000..9dbda33aa87 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/applications/include_applications/item/authentication_condition_application_app_item_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.authentication_condition_application import AuthenticationConditionApplication + from .........models.o_data_errors.o_data_error import ODataError + +class AuthenticationConditionApplicationAppItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the includeApplications property of the microsoft.graph.authenticationConditionsApplications entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AuthenticationConditionApplicationAppItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/conditions/applications/includeApplications/{authenticationConditionApplication%2DappId}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property includeApplications for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[AuthenticationConditionApplicationAppItemRequestBuilderGetQueryParameters]] = None) -> Optional[AuthenticationConditionApplication]: + """ + Get includeApplications from identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationConditionApplication] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.authentication_condition_application import AuthenticationConditionApplication + + return await self.request_adapter.send_async(request_info, AuthenticationConditionApplication, error_mapping) + + async def patch(self,body: AuthenticationConditionApplication, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[AuthenticationConditionApplication]: + """ + Update the navigation property includeApplications in identity + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationConditionApplication] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.authentication_condition_application import AuthenticationConditionApplication + + return await self.request_adapter.send_async(request_info, AuthenticationConditionApplication, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property includeApplications for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AuthenticationConditionApplicationAppItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get includeApplications from identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: AuthenticationConditionApplication, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property includeApplications in identity + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AuthenticationConditionApplicationAppItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AuthenticationConditionApplicationAppItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AuthenticationConditionApplicationAppItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AuthenticationConditionApplicationAppItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AuthenticationConditionApplicationAppItemRequestBuilderGetQueryParameters(): + """ + Get includeApplications from identity + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class AuthenticationConditionApplicationAppItemRequestBuilderGetRequestConfiguration(RequestConfiguration[AuthenticationConditionApplicationAppItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AuthenticationConditionApplicationAppItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/conditions_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/conditions_request_builder.py new file mode 100644 index 00000000000..3a908a39efb --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/conditions/conditions_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ......models.authentication_conditions import AuthenticationConditions + from ......models.o_data_errors.o_data_error import ODataError + from .applications.applications_request_builder import ApplicationsRequestBuilder + +class ConditionsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identity/authenticationEventsFlows/{authenticationEventsFlow-id}/graph.externalUsersSelfServiceSignUpEventsFlow/conditions + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ConditionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/conditions{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ConditionsRequestBuilderGetQueryParameters]] = None) -> Optional[AuthenticationConditions]: + """ + The conditions representing the context of the authentication request that's used to decide whether the events policy is invoked. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[AuthenticationConditions] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.authentication_conditions import AuthenticationConditions + + return await self.request_adapter.send_async(request_info, AuthenticationConditions, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ConditionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The conditions representing the context of the authentication request that's used to decide whether the events policy is invoked. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ConditionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ConditionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ConditionsRequestBuilder(self.request_adapter, raw_url) + + @property + def applications(self) -> ApplicationsRequestBuilder: + """ + The applications property + """ + from .applications.applications_request_builder import ApplicationsRequestBuilder + + return ApplicationsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ConditionsRequestBuilderGetQueryParameters(): + """ + The conditions representing the context of the authentication request that's used to decide whether the events policy is invoked. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ConditionsRequestBuilderGetRequestConfiguration(RequestConfiguration[ConditionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/graph_external_users_self_service_sign_up_events_flow_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/graph_external_users_self_service_sign_up_events_flow_request_builder.py new file mode 100644 index 00000000000..ddc122cdedb --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/graph_external_users_self_service_sign_up_events_flow_request_builder.py @@ -0,0 +1,136 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .....models.external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow + from .....models.o_data_errors.o_data_error import ODataError + from .conditions.conditions_request_builder import ConditionsRequestBuilder + from .on_attribute_collection.on_attribute_collection_request_builder import OnAttributeCollectionRequestBuilder + from .on_authentication_method_load_start.on_authentication_method_load_start_request_builder import OnAuthenticationMethodLoadStartRequestBuilder + +class GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder(BaseRequestBuilder): + """ + Casts the previous resource to externalUsersSelfServiceSignUpEventsFlow. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilderGetQueryParameters]] = None) -> Optional[ExternalUsersSelfServiceSignUpEventsFlow]: + """ + Get the item of type microsoft.graph.authenticationEventsFlow as microsoft.graph.externalUsersSelfServiceSignUpEventsFlow + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ExternalUsersSelfServiceSignUpEventsFlow] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow + + return await self.request_adapter.send_async(request_info, ExternalUsersSelfServiceSignUpEventsFlow, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the item of type microsoft.graph.authenticationEventsFlow as microsoft.graph.externalUsersSelfServiceSignUpEventsFlow + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilder(self.request_adapter, raw_url) + + @property + def conditions(self) -> ConditionsRequestBuilder: + """ + The conditions property + """ + from .conditions.conditions_request_builder import ConditionsRequestBuilder + + return ConditionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def on_attribute_collection(self) -> OnAttributeCollectionRequestBuilder: + """ + The onAttributeCollection property + """ + from .on_attribute_collection.on_attribute_collection_request_builder import OnAttributeCollectionRequestBuilder + + return OnAttributeCollectionRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def on_authentication_method_load_start(self) -> OnAuthenticationMethodLoadStartRequestBuilder: + """ + The onAuthenticationMethodLoadStart property + """ + from .on_authentication_method_load_start.on_authentication_method_load_start_request_builder import OnAuthenticationMethodLoadStartRequestBuilder + + return OnAuthenticationMethodLoadStartRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilderGetQueryParameters(): + """ + Get the item of type microsoft.graph.authenticationEventsFlow as microsoft.graph.externalUsersSelfServiceSignUpEventsFlow + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilderGetRequestConfiguration(RequestConfiguration[GraphExternalUsersSelfServiceSignUpEventsFlowRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/attributes_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/attributes_request_builder.py new file mode 100644 index 00000000000..64eee51a248 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/attributes_request_builder.py @@ -0,0 +1,172 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.identity_user_flow_attribute_collection_response import IdentityUserFlowAttributeCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.identity_user_flow_attribute_item_request_builder import IdentityUserFlowAttributeItemRequestBuilder + from .ref.ref_request_builder import RefRequestBuilder + +class AttributesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the attributes property of the microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AttributesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp/attributes{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_identity_user_flow_attribute_id(self,identity_user_flow_attribute_id: str) -> IdentityUserFlowAttributeItemRequestBuilder: + """ + Gets an item from the msgraph.generated.identity.authenticationEventsFlows.item.graphExternalUsersSelfServiceSignUpEventsFlow.onAttributeCollection.graphOnAttributeCollectionExternalUsersSelfServiceSignUp.attributes.item collection + param identity_user_flow_attribute_id: The unique identifier of identityUserFlowAttribute + Returns: IdentityUserFlowAttributeItemRequestBuilder + """ + if not identity_user_flow_attribute_id: + raise TypeError("identity_user_flow_attribute_id cannot be null.") + from .item.identity_user_flow_attribute_item_request_builder import IdentityUserFlowAttributeItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["identityUserFlowAttribute%2Did"] = identity_user_flow_attribute_id + return IdentityUserFlowAttributeItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[AttributesRequestBuilderGetQueryParameters]] = None) -> Optional[IdentityUserFlowAttributeCollectionResponse]: + """ + Get an identityUserFlowAttribute collection associated with an external identities self-service user flow represented by an externalUsersSelfServiceSignupEventsFlow object. These attributes are collected from the user during the authentication experience defined by the user flow. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[IdentityUserFlowAttributeCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/onattributecollectionexternalusersselfservicesignup-list-attributes?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.identity_user_flow_attribute_collection_response import IdentityUserFlowAttributeCollectionResponse + + return await self.request_adapter.send_async(request_info, IdentityUserFlowAttributeCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AttributesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get an identityUserFlowAttribute collection associated with an external identities self-service user flow represented by an externalUsersSelfServiceSignupEventsFlow object. These attributes are collected from the user during the authentication experience defined by the user flow. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> AttributesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AttributesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AttributesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ref(self) -> RefRequestBuilder: + """ + Provides operations to manage the collection of identityContainer entities. + """ + from .ref.ref_request_builder import RefRequestBuilder + + return RefRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AttributesRequestBuilderGetQueryParameters(): + """ + Get an identityUserFlowAttribute collection associated with an external identities self-service user flow represented by an externalUsersSelfServiceSignupEventsFlow object. These attributes are collected from the user during the authentication experience defined by the user flow. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class AttributesRequestBuilderGetRequestConfiguration(RequestConfiguration[AttributesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/count/count_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/count/count_request_builder.py new file mode 100644 index 00000000000..1d035b859b4 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp/attributes/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/item/identity_user_flow_attribute_item_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/item/identity_user_flow_attribute_item_request_builder.py new file mode 100644 index 00000000000..7e226986c73 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/item/identity_user_flow_attribute_item_request_builder.py @@ -0,0 +1,32 @@ +from __future__ import annotations +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.request_adapter import RequestAdapter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .ref.ref_request_builder import RefRequestBuilder + +class IdentityUserFlowAttributeItemRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identity/authenticationEventsFlows/{authenticationEventsFlow-id}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp/attributes/{identityUserFlowAttribute-id} + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IdentityUserFlowAttributeItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp/attributes/{identityUserFlowAttribute%2Did}", path_parameters) + + @property + def ref(self) -> RefRequestBuilder: + """ + Provides operations to manage the collection of identityContainer entities. + """ + from .ref.ref_request_builder import RefRequestBuilder + + return RefRequestBuilder(self.request_adapter, self.path_parameters) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/item/ref/ref_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/item/ref/ref_request_builder.py new file mode 100644 index 00000000000..e6e48001697 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/item/ref/ref_request_builder.py @@ -0,0 +1,77 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class RefRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the collection of identityContainer entities. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RefRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp/attributes/{identityUserFlowAttribute%2Did}/$ref", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete ref of navigation property attributes for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete ref of navigation property attributes for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RefRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RefRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RefRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RefRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/ref/ref_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/ref/ref_request_builder.py new file mode 100644 index 00000000000..597e066800c --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/attributes/ref/ref_request_builder.py @@ -0,0 +1,229 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.reference_create import ReferenceCreate + from .........models.string_collection_response import StringCollectionResponse + +class RefRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the collection of identityContainer entities. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RefRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp/attributes/$ref?@id={%40id}{&%24count,%24filter,%24orderby,%24search,%24skip,%24top}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[RefRequestBuilderDeleteQueryParameters]] = None) -> None: + """ + Delete ref of navigation property attributes for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[RefRequestBuilderGetQueryParameters]] = None) -> Optional[StringCollectionResponse]: + """ + Get an identityUserFlowAttribute collection associated with an external identities self-service user flow represented by an externalUsersSelfServiceSignupEventsFlow object. These attributes are collected from the user during the authentication experience defined by the user flow. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[StringCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/onattributecollectionexternalusersselfservicesignup-list-attributes?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.string_collection_response import StringCollectionResponse + + return await self.request_adapter.send_async(request_info, StringCollectionResponse, error_mapping) + + async def post(self,body: ReferenceCreate, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Add an attribute to an external identities self-service user flow represented by an externalUsersSelfServiceSignupEventsFlow object. You can add both custom and built-in attributes to a user flow. Prerequisite: PATCH the user flow with the updated onAttributeCollection event that includes the new attribute. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/onattributecollectionexternalusersselfservicesignup-post-attributes?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[RefRequestBuilderDeleteQueryParameters]] = None) -> RequestInformation: + """ + Delete ref of navigation property attributes for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, '{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp/attributes/$ref?@id={%40id}', self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RefRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get an identityUserFlowAttribute collection associated with an external identities self-service user flow represented by an externalUsersSelfServiceSignupEventsFlow object. These attributes are collected from the user during the authentication experience defined by the user flow. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, '{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp/attributes/$ref{?%24count,%24filter,%24orderby,%24search,%24skip,%24top}', self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ReferenceCreate, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Add an attribute to an external identities self-service user flow represented by an externalUsersSelfServiceSignupEventsFlow object. You can add both custom and built-in attributes to a user flow. Prerequisite: PATCH the user flow with the updated onAttributeCollection event that includes the new attribute. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, '{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp/attributes/$ref', self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RefRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RefRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RefRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RefRequestBuilderDeleteQueryParameters(): + """ + Delete ref of navigation property attributes for identity + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "id": + return "%40id" + return original_name + + # The delete Uri + id: Optional[str] = None + + + @dataclass + class RefRequestBuilderDeleteRequestConfiguration(RequestConfiguration[RefRequestBuilderDeleteQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RefRequestBuilderGetQueryParameters(): + """ + Get an identityUserFlowAttribute collection associated with an external identities self-service user flow represented by an externalUsersSelfServiceSignupEventsFlow object. These attributes are collected from the user during the authentication experience defined by the user flow. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class RefRequestBuilderGetRequestConfiguration(RequestConfiguration[RefRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RefRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/graph_on_attribute_collection_external_users_self_service_sign_up_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/graph_on_attribute_collection_external_users_self_service_sign_up_request_builder.py new file mode 100644 index 00000000000..3a3fa479278 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/graph_on_attribute_collection_external_users_self_service_sign_up/graph_on_attribute_collection_external_users_self_service_sign_up_request_builder.py @@ -0,0 +1,87 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .attributes.attributes_request_builder import AttributesRequestBuilder + +class GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilder(BaseRequestBuilder): + """ + Casts the previous resource to onAttributeCollectionExternalUsersSelfServiceSignUp. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection/graph.onAttributeCollectionExternalUsersSelfServiceSignUp", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> bytes: + """ + Get the items of type microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp in the microsoft.graph.onAttributeCollectionHandler collection + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Get the items of type microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp in the microsoft.graph.onAttributeCollectionHandler collection + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilder(self.request_adapter, raw_url) + + @property + def attributes(self) -> AttributesRequestBuilder: + """ + Provides operations to manage the attributes property of the microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp entity. + """ + from .attributes.attributes_request_builder import AttributesRequestBuilder + + return AttributesRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/on_attribute_collection_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/on_attribute_collection_request_builder.py new file mode 100644 index 00000000000..4ccec7d3d6a --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_attribute_collection/on_attribute_collection_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ......models.on_attribute_collection_handler import OnAttributeCollectionHandler + from ......models.o_data_errors.o_data_error import ODataError + from .graph_on_attribute_collection_external_users_self_service_sign_up.graph_on_attribute_collection_external_users_self_service_sign_up_request_builder import GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilder + +class OnAttributeCollectionRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identity/authenticationEventsFlows/{authenticationEventsFlow-id}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new OnAttributeCollectionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAttributeCollection{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[OnAttributeCollectionRequestBuilderGetQueryParameters]] = None) -> Optional[OnAttributeCollectionHandler]: + """ + The configuration for what to invoke when attributes are ready to be collected from the user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[OnAttributeCollectionHandler] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.on_attribute_collection_handler import OnAttributeCollectionHandler + + return await self.request_adapter.send_async(request_info, OnAttributeCollectionHandler, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[OnAttributeCollectionRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The configuration for what to invoke when attributes are ready to be collected from the user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> OnAttributeCollectionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OnAttributeCollectionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OnAttributeCollectionRequestBuilder(self.request_adapter, raw_url) + + @property + def graph_on_attribute_collection_external_users_self_service_sign_up(self) -> GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilder: + """ + Casts the previous resource to onAttributeCollectionExternalUsersSelfServiceSignUp. + """ + from .graph_on_attribute_collection_external_users_self_service_sign_up.graph_on_attribute_collection_external_users_self_service_sign_up_request_builder import GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilder + + return GraphOnAttributeCollectionExternalUsersSelfServiceSignUpRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class OnAttributeCollectionRequestBuilderGetQueryParameters(): + """ + The configuration for what to invoke when attributes are ready to be collected from the user. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class OnAttributeCollectionRequestBuilderGetRequestConfiguration(RequestConfiguration[OnAttributeCollectionRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/graph_on_authentication_method_load_start_external_users_self_service_sign_up_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/graph_on_authentication_method_load_start_external_users_self_service_sign_up_request_builder.py new file mode 100644 index 00000000000..e75c66ed12d --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/graph_on_authentication_method_load_start_external_users_self_service_sign_up_request_builder.py @@ -0,0 +1,87 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .identity_providers.identity_providers_request_builder import IdentityProvidersRequestBuilder + +class GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilder(BaseRequestBuilder): + """ + Casts the previous resource to onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> bytes: + """ + Get the items of type microsoft.graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp in the microsoft.graph.onAuthenticationMethodLoadStartHandler collection + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Get the items of type microsoft.graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp in the microsoft.graph.onAuthenticationMethodLoadStartHandler collection + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilder(self.request_adapter, raw_url) + + @property + def identity_providers(self) -> IdentityProvidersRequestBuilder: + """ + Provides operations to manage the identityProviders property of the microsoft.graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp entity. + """ + from .identity_providers.identity_providers_request_builder import IdentityProvidersRequestBuilder + + return IdentityProvidersRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/count/count_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/count/count_request_builder.py new file mode 100644 index 00000000000..13ba5691904 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/identity_providers_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/identity_providers_request_builder.py new file mode 100644 index 00000000000..45b78ce0995 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/identity_providers_request_builder.py @@ -0,0 +1,172 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.identity_provider_base_collection_response import IdentityProviderBaseCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.identity_provider_base_item_request_builder import IdentityProviderBaseItemRequestBuilder + from .ref.ref_request_builder import RefRequestBuilder + +class IdentityProvidersRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the identityProviders property of the microsoft.graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IdentityProvidersRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_identity_provider_base_id(self,identity_provider_base_id: str) -> IdentityProviderBaseItemRequestBuilder: + """ + Gets an item from the msgraph.generated.identity.authenticationEventsFlows.item.graphExternalUsersSelfServiceSignUpEventsFlow.onAuthenticationMethodLoadStart.graphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp.identityProviders.item collection + param identity_provider_base_id: The unique identifier of identityProviderBase + Returns: IdentityProviderBaseItemRequestBuilder + """ + if not identity_provider_base_id: + raise TypeError("identity_provider_base_id cannot be null.") + from .item.identity_provider_base_item_request_builder import IdentityProviderBaseItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["identityProviderBase%2Did"] = identity_provider_base_id + return IdentityProviderBaseItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[IdentityProvidersRequestBuilderGetQueryParameters]] = None) -> Optional[IdentityProviderBaseCollectionResponse]: + """ + Get the identity providers that are defined for an external identities self-service sign up user flow that's represented by an externalUsersSelfServiceSignupEventsFlow object type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[IdentityProviderBaseCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/onauthenticationmethodloadstartexternalusersselfservicesignup-list-identityproviders?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.identity_provider_base_collection_response import IdentityProviderBaseCollectionResponse + + return await self.request_adapter.send_async(request_info, IdentityProviderBaseCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[IdentityProvidersRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the identity providers that are defined for an external identities self-service sign up user flow that's represented by an externalUsersSelfServiceSignupEventsFlow object type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> IdentityProvidersRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IdentityProvidersRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IdentityProvidersRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ref(self) -> RefRequestBuilder: + """ + Provides operations to manage the collection of identityContainer entities. + """ + from .ref.ref_request_builder import RefRequestBuilder + + return RefRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class IdentityProvidersRequestBuilderGetQueryParameters(): + """ + Get the identity providers that are defined for an external identities self-service sign up user flow that's represented by an externalUsersSelfServiceSignupEventsFlow object type. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class IdentityProvidersRequestBuilderGetRequestConfiguration(RequestConfiguration[IdentityProvidersRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/item/identity_provider_base_item_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/item/identity_provider_base_item_request_builder.py new file mode 100644 index 00000000000..90c43efd23f --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/item/identity_provider_base_item_request_builder.py @@ -0,0 +1,32 @@ +from __future__ import annotations +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.request_adapter import RequestAdapter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .ref.ref_request_builder import RefRequestBuilder + +class IdentityProviderBaseItemRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identity/authenticationEventsFlows/{authenticationEventsFlow-id}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders/{identityProviderBase-id} + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IdentityProviderBaseItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders/{identityProviderBase%2Did}", path_parameters) + + @property + def ref(self) -> RefRequestBuilder: + """ + Provides operations to manage the collection of identityContainer entities. + """ + from .ref.ref_request_builder import RefRequestBuilder + + return RefRequestBuilder(self.request_adapter, self.path_parameters) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/item/ref/ref_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/item/ref/ref_request_builder.py new file mode 100644 index 00000000000..8d99a7bb4db --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/item/ref/ref_request_builder.py @@ -0,0 +1,77 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class RefRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the collection of identityContainer entities. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RefRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders/{identityProviderBase%2Did}/$ref", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete ref of navigation property identityProviders for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete ref of navigation property identityProviders for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RefRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RefRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RefRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RefRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/ref/ref_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/ref/ref_request_builder.py new file mode 100644 index 00000000000..26b156a73c4 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/graph_on_authentication_method_load_start_external_users_self_service_sign_up/identity_providers/ref/ref_request_builder.py @@ -0,0 +1,229 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.reference_create import ReferenceCreate + from .........models.string_collection_response import StringCollectionResponse + +class RefRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the collection of identityContainer entities. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RefRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders/$ref?@id={%40id}{&%24count,%24filter,%24orderby,%24search,%24skip,%24top}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[RefRequestBuilderDeleteQueryParameters]] = None) -> None: + """ + Delete ref of navigation property identityProviders for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[RefRequestBuilderGetQueryParameters]] = None) -> Optional[StringCollectionResponse]: + """ + Get the identity providers that are defined for an external identities self-service sign up user flow that's represented by an externalUsersSelfServiceSignupEventsFlow object type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[StringCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/onauthenticationmethodloadstartexternalusersselfservicesignup-list-identityproviders?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.string_collection_response import StringCollectionResponse + + return await self.request_adapter.send_async(request_info, StringCollectionResponse, error_mapping) + + async def post(self,body: ReferenceCreate, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Add an identity provider to an external identities self-service user flow represented by an externalUsersSelfServiceSignupEventsFlow object type. The identity provider must first be configured in the tenant. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/onauthenticationmethodloadstartexternalusersselfservicesignup-post-identityproviders?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[RefRequestBuilderDeleteQueryParameters]] = None) -> RequestInformation: + """ + Delete ref of navigation property identityProviders for identity + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, '{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders/$ref?@id={%40id}', self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RefRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the identity providers that are defined for an external identities self-service sign up user flow that's represented by an externalUsersSelfServiceSignupEventsFlow object type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, '{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders/$ref{?%24count,%24filter,%24orderby,%24search,%24skip,%24top}', self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ReferenceCreate, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Add an identity provider to an external identities self-service user flow represented by an externalUsersSelfServiceSignupEventsFlow object type. The identity provider must first be configured in the tenant. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, '{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart/graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp/identityProviders/$ref', self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RefRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RefRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RefRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RefRequestBuilderDeleteQueryParameters(): + """ + Delete ref of navigation property identityProviders for identity + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "id": + return "%40id" + return original_name + + # The delete Uri + id: Optional[str] = None + + + @dataclass + class RefRequestBuilderDeleteRequestConfiguration(RequestConfiguration[RefRequestBuilderDeleteQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RefRequestBuilderGetQueryParameters(): + """ + Get the identity providers that are defined for an external identities self-service sign up user flow that's represented by an externalUsersSelfServiceSignupEventsFlow object type. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class RefRequestBuilderGetRequestConfiguration(RequestConfiguration[RefRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RefRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/on_authentication_method_load_start_request_builder.py b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/on_authentication_method_load_start_request_builder.py new file mode 100644 index 00000000000..8b263e7d159 --- /dev/null +++ b/msgraph/generated/identity/authentication_events_flows/item/graph_external_users_self_service_sign_up_events_flow/on_authentication_method_load_start/on_authentication_method_load_start_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ......models.on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + from ......models.o_data_errors.o_data_error import ODataError + from .graph_on_authentication_method_load_start_external_users_self_service_sign_up.graph_on_authentication_method_load_start_external_users_self_service_sign_up_request_builder import GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilder + +class OnAuthenticationMethodLoadStartRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /identity/authenticationEventsFlows/{authenticationEventsFlow-id}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new OnAuthenticationMethodLoadStartRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/identity/authenticationEventsFlows/{authenticationEventsFlow%2Did}/graph.externalUsersSelfServiceSignUpEventsFlow/onAuthenticationMethodLoadStart{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[OnAuthenticationMethodLoadStartRequestBuilderGetQueryParameters]] = None) -> Optional[OnAuthenticationMethodLoadStartHandler]: + """ + Required. The configuration for what to invoke when authentication methods are ready to be presented to the user. Must have at least one identity provider linked. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[OnAuthenticationMethodLoadStartHandler] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + + return await self.request_adapter.send_async(request_info, OnAuthenticationMethodLoadStartHandler, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[OnAuthenticationMethodLoadStartRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Required. The configuration for what to invoke when authentication methods are ready to be presented to the user. Must have at least one identity provider linked. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> OnAuthenticationMethodLoadStartRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OnAuthenticationMethodLoadStartRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OnAuthenticationMethodLoadStartRequestBuilder(self.request_adapter, raw_url) + + @property + def graph_on_authentication_method_load_start_external_users_self_service_sign_up(self) -> GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilder: + """ + Casts the previous resource to onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp. + """ + from .graph_on_authentication_method_load_start_external_users_self_service_sign_up.graph_on_authentication_method_load_start_external_users_self_service_sign_up_request_builder import GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilder + + return GraphOnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUpRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class OnAuthenticationMethodLoadStartRequestBuilderGetQueryParameters(): + """ + Required. The configuration for what to invoke when authentication methods are ready to be presented to the user. Must have at least one identity provider linked. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class OnAuthenticationMethodLoadStartRequestBuilderGetRequestConfiguration(RequestConfiguration[OnAuthenticationMethodLoadStartRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/identity/conditional_access/named_locations/item/named_location_item_request_builder.py b/msgraph/generated/identity/conditional_access/named_locations/item/named_location_item_request_builder.py index 5570b529e9f..bdbcb9170a0 100644 --- a/msgraph/generated/identity/conditional_access/named_locations/item/named_location_item_request_builder.py +++ b/msgraph/generated/identity/conditional_access/named_locations/item/named_location_item_request_builder.py @@ -31,10 +31,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: """ - Delete a countryNamedLocation object. + Delete an ipNamedLocation object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None - Find more info here: https://learn.microsoft.com/graph/api/countrynamedlocation-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/ipnamedlocation-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -50,10 +50,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[NamedLocationItemRequestBuilderGetQueryParameters]] = None) -> Optional[NamedLocation]: """ - Retrieve the properties and relationships of a namedLocation object. + Retrieve the properties and relationships of an ipNamedLocation object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[NamedLocation] - Find more info here: https://learn.microsoft.com/graph/api/namedlocation-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/ipnamedlocation-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -71,11 +71,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[NamedLoc async def patch(self,body: NamedLocation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[NamedLocation]: """ - Update the properties of a countryNamedLocation object. + Update the properties of an ipNamedLocation object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[NamedLocation] - Find more info here: https://learn.microsoft.com/graph/api/countrynamedlocation-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/ipnamedlocation-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,7 +95,7 @@ async def patch(self,body: NamedLocation, request_configuration: Optional[Reques def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Delete a countryNamedLocation object. + Delete an ipNamedLocation object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -106,7 +106,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[NamedLocationItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Retrieve the properties and relationships of a namedLocation object. + Retrieve the properties and relationships of an ipNamedLocation object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -117,7 +117,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_patch_request_information(self,body: NamedLocation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Update the properties of a countryNamedLocation object. + Update the properties of an ipNamedLocation object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -150,7 +150,7 @@ class NamedLocationItemRequestBuilderDeleteRequestConfiguration(RequestConfigura @dataclass class NamedLocationItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of a namedLocation object. + Retrieve the properties and relationships of an ipNamedLocation object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/identity/identity_request_builder.py b/msgraph/generated/identity/identity_request_builder.py index 64f1841cad1..d9c1ea0889b 100644 --- a/msgraph/generated/identity/identity_request_builder.py +++ b/msgraph/generated/identity/identity_request_builder.py @@ -16,6 +16,7 @@ from ..models.identity_container import IdentityContainer from ..models.o_data_errors.o_data_error import ODataError from .api_connectors.api_connectors_request_builder import ApiConnectorsRequestBuilder + from .authentication_events_flows.authentication_events_flows_request_builder import AuthenticationEventsFlowsRequestBuilder from .authentication_event_listeners.authentication_event_listeners_request_builder import AuthenticationEventListenersRequestBuilder from .b2x_user_flows.b2x_user_flows_request_builder import B2xUserFlowsRequestBuilder from .conditional_access.conditional_access_request_builder import ConditionalAccessRequestBuilder @@ -133,6 +134,15 @@ def authentication_event_listeners(self) -> AuthenticationEventListenersRequestB return AuthenticationEventListenersRequestBuilder(self.request_adapter, self.path_parameters) + @property + def authentication_events_flows(self) -> AuthenticationEventsFlowsRequestBuilder: + """ + Provides operations to manage the authenticationEventsFlows property of the microsoft.graph.identityContainer entity. + """ + from .authentication_events_flows.authentication_events_flows_request_builder import AuthenticationEventsFlowsRequestBuilder + + return AuthenticationEventsFlowsRequestBuilder(self.request_adapter, self.path_parameters) + @property def b2x_user_flows(self) -> B2xUserFlowsRequestBuilder: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_package_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_package_item_request_builder.py index a4f99bab601..1e1b0fb5833 100644 --- a/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_package_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/access_packages/item/access_package_item_request_builder.py @@ -57,10 +57,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[AccessPackageItemRequestBuilderGetQueryParameters]] = None) -> Optional[AccessPackage]: """ - Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. + Retrieve the properties and relationships of an accessPackage object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackage] - Find more info here: https://learn.microsoft.com/graph/api/accesspackage-list-resourcerolescopes?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/accesspackage-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -113,7 +113,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AccessPackageItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. + Retrieve the properties and relationships of an accessPackage object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -220,7 +220,7 @@ class AccessPackageItemRequestBuilderDeleteRequestConfiguration(RequestConfigura @dataclass class AccessPackageItemRequestBuilderGetQueryParameters(): """ - Retrieve an access package with a list of accessPackageResourceRoleScope objects. These objects represent the resource roles that an access package assigns to each subject. Each object links to an accessPackageResourceRole and an accessPackageResourceScope. + Retrieve the properties and relationships of an accessPackage object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/assignment/assignment_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/assignment/assignment_request_builder.py index 501a1f9f87e..2bc7c01c349 100644 --- a/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/assignment/assignment_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/assignment_requests/item/assignment/assignment_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def get(self,request_configuration: Optional[RequestConfiguration[AssignmentRequestBuilderGetQueryParameters]] = None) -> Optional[AccessPackageAssignment]: """ - For a requestType of userAdd or adminAdd, this is an access package assignment requested to be created. For a requestType of userRemove, adminRemove or systemRemove, this has the id property of an existing assignment to be removed. Supports $expand. + For a requestType of userAdd or adminAdd, this is an access package assignment requested to be created. For a requestType of userRemove, adminRemove or systemRemove, this has the id property of an existing assignment to be removed. Supports $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[AccessPackageAssignment] """ @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Assignme def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AssignmentRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - For a requestType of userAdd or adminAdd, this is an access package assignment requested to be created. For a requestType of userRemove, adminRemove or systemRemove, this has the id property of an existing assignment to be removed. Supports $expand. + For a requestType of userAdd or adminAdd, this is an access package assignment requested to be created. For a requestType of userRemove, adminRemove or systemRemove, this has the id property of an existing assignment to be removed. Supports $expand. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -73,7 +73,7 @@ def with_url(self,raw_url: str) -> AssignmentRequestBuilder: @dataclass class AssignmentRequestBuilderGetQueryParameters(): """ - For a requestType of userAdd or adminAdd, this is an access package assignment requested to be created. For a requestType of userRemove, adminRemove or systemRemove, this has the id property of an existing assignment to be removed. Supports $expand. + For a requestType of userAdd or adminAdd, this is an access package assignment requested to be created. For a requestType of userRemove, adminRemove or systemRemove, this has the id property of an existing assignment to be removed. Supports $expand. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/item/custom_callout_extension_item_request_builder.py b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/item/custom_callout_extension_item_request_builder.py index f7d76369b20..3cb9a063d2a 100644 --- a/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/item/custom_callout_extension_item_request_builder.py +++ b/msgraph/generated/identity_governance/entitlement_management/catalogs/item/custom_workflow_extensions/item/custom_callout_extension_item_request_builder.py @@ -31,10 +31,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: """ - Delete an accessPackageAssignmentRequestWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies: + Delete an accessPackageAssignmentWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies: param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None - Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentrequestworkflowextension-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentworkflowextension-delete?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -50,10 +50,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[CustomCalloutExtensionItemRequestBuilderGetQueryParameters]] = None) -> Optional[CustomCalloutExtension]: """ - Read the properties and relationships of an accessPackageAssignmentWorkflowExtension object. + Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomCalloutExtension] - Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentworkflowextension-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentrequestworkflowextension-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -71,11 +71,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[CustomCa async def patch(self,body: CustomCalloutExtension, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CustomCalloutExtension]: """ - Update the properties of an accessPackageAssignmentWorkflowExtension object. + Update the properties of an accessPackageAssignmentRequestWorkflowExtension object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CustomCalloutExtension] - Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentworkflowextension-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/accesspackageassignmentrequestworkflowextension-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,7 +95,7 @@ async def patch(self,body: CustomCalloutExtension, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Delete an accessPackageAssignmentRequestWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies: + Delete an accessPackageAssignmentWorkflowExtension object. The custom workflow extension must first be removed from any associated policies before it can be deleted. Follow these steps to remove the custom workflow extension from any associated policies: param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -106,7 +106,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CustomCalloutExtensionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read the properties and relationships of an accessPackageAssignmentWorkflowExtension object. + Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -117,7 +117,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_patch_request_information(self,body: CustomCalloutExtension, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Update the properties of an accessPackageAssignmentWorkflowExtension object. + Update the properties of an accessPackageAssignmentRequestWorkflowExtension object. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -150,7 +150,7 @@ class CustomCalloutExtensionItemRequestBuilderDeleteRequestConfiguration(Request @dataclass class CustomCalloutExtensionItemRequestBuilderGetQueryParameters(): """ - Read the properties and relationships of an accessPackageAssignmentWorkflowExtension object. + Read the properties and relationships of an accessPackageAssignmentRequestWorkflowExtension object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/kiota-lock.json b/msgraph/generated/kiota-lock.json index 096a1afcfae..a3fa6240606 100644 --- a/msgraph/generated/kiota-lock.json +++ b/msgraph/generated/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "2BE07407CFC7E51B2F7C4F00D533B957E4C24DABE6B08C1CD1EC7F89AE142F46477CFC82D26CDE5F523AA19B8216A6070305B7E90500D57F238CAD73ED8C7524", + "descriptionHash": "228DBD2669F051EAF07E85C0B4785D1ED3E57A28022B67D64ACC2F757756E39FA2792C9324E9E816D2E0191098BEE72BE55B1BC266D5194B89F2E51E5A9AE670", "descriptionLocation": "../../msgraph-metadata/clean_v10_openapi/openapi.yaml", "lockFileVersion": "1.0.0", "kiotaVersion": "1.15.0", diff --git a/msgraph/generated/models/access_package_assignment.py b/msgraph/generated/models/access_package_assignment.py index dab3142e62e..d5bfa827ec3 100644 --- a/msgraph/generated/models/access_package_assignment.py +++ b/msgraph/generated/models/access_package_assignment.py @@ -31,7 +31,7 @@ class AccessPackageAssignment(Entity): schedule: Optional[EntitlementManagementSchedule] = None # The state of the access package assignment. The possible values are: delivering, partiallyDelivered, delivered, expired, deliveryFailed, unknownFutureValue. Read-only. Supports $filter (eq). state: Optional[AccessPackageAssignmentState] = None - # More information about the assignment lifecycle. Possible values include Delivering, Delivered, NearExpiry1DayNotificationTriggered, or ExpiredNotificationTriggered. Read-only. + # More information about the assignment lifecycle. Possible values include Delivering, Delivered, NearExpiry1DayNotificationTriggered, or ExpiredNotificationTriggered. Read-only. status: Optional[str] = None # The subject of the access package assignment. Read-only. Nullable. Supports $expand. Supports $filter (eq) on objectId. target: Optional[AccessPackageSubject] = None diff --git a/msgraph/generated/models/access_package_assignment_request.py b/msgraph/generated/models/access_package_assignment_request.py index 52be4fe5323..b8d8ec438e8 100644 --- a/msgraph/generated/models/access_package_assignment_request.py +++ b/msgraph/generated/models/access_package_assignment_request.py @@ -23,7 +23,7 @@ class AccessPackageAssignmentRequest(Entity): access_package: Optional[AccessPackage] = None # Answers provided by the requestor to accessPackageQuestions asked of them at the time of request. answers: Optional[List[AccessPackageAnswer]] = None - # For a requestType of userAdd or adminAdd, this is an access package assignment requested to be created. For a requestType of userRemove, adminRemove or systemRemove, this has the id property of an existing assignment to be removed. Supports $expand. + # For a requestType of userAdd or adminAdd, this is an access package assignment requested to be created. For a requestType of userRemove, adminRemove or systemRemove, this has the id property of an existing assignment to be removed. Supports $expand. assignment: Optional[AccessPackageAssignment] = None # The date of the end of processing, either successful or failure, of a request. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. completed_date_time: Optional[datetime.datetime] = None @@ -33,7 +33,7 @@ class AccessPackageAssignmentRequest(Entity): custom_extension_callout_instances: Optional[List[CustomExtensionCalloutInstance]] = None # The OdataType property odata_type: Optional[str] = None - # The type of the request. The possible values are: notSpecified, userAdd, UserExtend, userUpdate, userRemove, adminAdd, adminUpdate, adminRemove, systemAdd, systemUpdate, systemRemove, onBehalfAdd (not supported), unknownFutureValue. A request from the user themselves would have requestType of userAdd, userUpdate or userRemove. This property can't be changed once set. + # The type of the request. The possible values are: notSpecified, userAdd, UserExtend, userUpdate, userRemove, adminAdd, adminUpdate, adminRemove, systemAdd, systemUpdate, systemRemove, onBehalfAdd (not supported), unknownFutureValue. Requests from the user have a requestType of userAdd, userUpdate, or userRemove. This property can't be changed once set. request_type: Optional[AccessPackageRequestType] = None # The subject who requested or, if a direct assignment, was assigned. Read-only. Nullable. Supports $expand. requestor: Optional[AccessPackageSubject] = None diff --git a/msgraph/generated/models/access_package_resource.py b/msgraph/generated/models/access_package_resource.py index f822a062b44..39548d6e1ad 100644 --- a/msgraph/generated/models/access_package_resource.py +++ b/msgraph/generated/models/access_package_resource.py @@ -29,7 +29,7 @@ class AccessPackageResource(Entity): modified_date_time: Optional[datetime.datetime] = None # The OdataType property odata_type: Optional[str] = None - # The unique identifier of the resource in the origin system. In the case of a Microsoft Entra group, this is the identifier of the group. + # The unique identifier of the resource in the origin system. For a Microsoft Entra group, this is the identifier of the group. origin_id: Optional[str] = None # The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup. origin_system: Optional[str] = None diff --git a/msgraph/generated/models/access_package_resource_request.py b/msgraph/generated/models/access_package_resource_request.py index 242be05b528..184df85a465 100644 --- a/msgraph/generated/models/access_package_resource_request.py +++ b/msgraph/generated/models/access_package_resource_request.py @@ -25,7 +25,7 @@ class AccessPackageResourceRequest(Entity): request_type: Optional[AccessPackageRequestType] = None # The resource property resource: Optional[AccessPackageResource] = None - # The outcome of whether the service was able to add the resource to the catalog. The value is delivered if the resource was added or removed, and deliveryFailed if it could not be added or removed. Read-only. + # The outcome of whether the service was able to add the resource to the catalog. The value is delivered if the resource was added or removed, and deliveryFailed if it couldn't be added or removed. Read-only. state: Optional[AccessPackageRequestState] = None @staticmethod diff --git a/msgraph/generated/models/access_package_resource_role.py b/msgraph/generated/models/access_package_resource_role.py index 6d1aabbdb09..76a536b0779 100644 --- a/msgraph/generated/models/access_package_resource_role.py +++ b/msgraph/generated/models/access_package_resource_role.py @@ -17,9 +17,9 @@ class AccessPackageResourceRole(Entity): display_name: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # The unique identifier of the resource role in the origin system. For a SharePoint Online site, the originId will be the sequence number of the role in the site. + # The unique identifier of the resource role in the origin system. For a SharePoint Online site, the originId is the sequence number of the role in the site. origin_id: Optional[str] = None - # The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup. + # The type of the resource in the origin system, such as SharePointOnline, AadApplication, or AadGroup. origin_system: Optional[str] = None # The resource property resource: Optional[AccessPackageResource] = None diff --git a/msgraph/generated/models/access_review_instance_decision_item.py b/msgraph/generated/models/access_review_instance_decision_item.py index e0361783d8a..d722932d155 100644 --- a/msgraph/generated/models/access_review_instance_decision_item.py +++ b/msgraph/generated/models/access_review_instance_decision_item.py @@ -35,7 +35,7 @@ class AccessReviewInstanceDecisionItem(Entity): principal: Optional[Identity] = None # A link to the principal object. For example, https://graph.microsoft.com/v1.0/users/a6c7aecb-cbfd-4763-87ef-e91b4bd509d9. Read-only. principal_link: Optional[str] = None - # A system-generated recommendation for the approval decision based off last interactive sign-in to tenant. Recommend approve if sign-in is within thirty days of start of review. Recommend deny if sign-in is greater than thirty days of start of review. Recommendation not available otherwise. Possible values: Approve, Deny, or NoInfoAvailable. Supports $select, $orderby, and $filter (eq only). Read-only. + # A system-generated recommendation for the approval decision based off last interactive sign-in to tenant. The value is Approve if the sign-in is fewer than 30 days after the start of review, Deny if the sign-in is greater than 30 days after, or NoInfoAvailable. Possible values: Approve, Deny, or NoInfoAvailable. Supports $select, $orderby, and $filter (eq only). Read-only. recommendation: Optional[str] = None # Every decision item in an access review represents a principal's access to a resource. This property represents details of the resource. For example, if a decision item represents access of User 'Bob' to Group 'Sales' - The principal is Bob and the resource is 'Sales'. Resources can be of multiple types. See accessReviewInstanceDecisionItemResource. Read-only. resource: Optional[AccessReviewInstanceDecisionItemResource] = None diff --git a/msgraph/generated/models/authentication.py b/msgraph/generated/models/authentication.py index 591398b54cc..5ef591aab70 100644 --- a/msgraph/generated/models/authentication.py +++ b/msgraph/generated/models/authentication.py @@ -32,11 +32,11 @@ class Authentication(Entity): odata_type: Optional[str] = None # Represents the status of a long-running operation. operations: Optional[List[LongRunningOperation]] = None - # Represents the password that's registered to a user for authentication. For security, the password itself will never be returned in the object, but action can be taken to reset a password. + # Represents the password registered to a user for authentication. For security, the password itself is never returned in the object, but action can be taken to reset a password. password_methods: Optional[List[PasswordAuthenticationMethod]] = None # The phone numbers registered to a user for authentication. phone_methods: Optional[List[PhoneAuthenticationMethod]] = None - # The software OATH TOTP applications registered to a user for authentication. + # The software OATH time-based one-time password (TOTP) applications registered to a user for authentication. software_oath_methods: Optional[List[SoftwareOathAuthenticationMethod]] = None # Represents a Temporary Access Pass registered to a user for authentication through time-limited passcodes. temporary_access_pass_methods: Optional[List[TemporaryAccessPassAuthenticationMethod]] = None diff --git a/msgraph/generated/models/authentication_attribute_collection_input_configuration.py b/msgraph/generated/models/authentication_attribute_collection_input_configuration.py new file mode 100644 index 00000000000..50c70f6fd82 --- /dev/null +++ b/msgraph/generated/models/authentication_attribute_collection_input_configuration.py @@ -0,0 +1,99 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_attribute_collection_input_type import AuthenticationAttributeCollectionInputType + from .authentication_attribute_collection_option_configuration import AuthenticationAttributeCollectionOptionConfiguration + +@dataclass +class AuthenticationAttributeCollectionInputConfiguration(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The built-in or custom attribute for which a value is being collected. + attribute: Optional[str] = None + # The default value of the attribute displayed to the end user. + default_value: Optional[str] = None + # Whether the attribute is editable by the end user. + editable: Optional[bool] = None + # Whether the attribute is displayed to the end user. + hidden: Optional[bool] = None + # The inputType property + input_type: Optional[AuthenticationAttributeCollectionInputType] = None + # The label of the attribute field that is displayed to end user, unless overridden. + label: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + # The option values for certain multiple-option input types. + options: Optional[List[AuthenticationAttributeCollectionOptionConfiguration]] = None + # Whether the field is required. + required: Optional[bool] = None + # The regex for the value of the field. + validation_reg_ex: Optional[str] = None + # Whether the value collected is stored. + write_to_directory: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AuthenticationAttributeCollectionInputConfiguration: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AuthenticationAttributeCollectionInputConfiguration + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AuthenticationAttributeCollectionInputConfiguration() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_attribute_collection_input_type import AuthenticationAttributeCollectionInputType + from .authentication_attribute_collection_option_configuration import AuthenticationAttributeCollectionOptionConfiguration + + from .authentication_attribute_collection_input_type import AuthenticationAttributeCollectionInputType + from .authentication_attribute_collection_option_configuration import AuthenticationAttributeCollectionOptionConfiguration + + fields: Dict[str, Callable[[Any], None]] = { + "attribute": lambda n : setattr(self, 'attribute', n.get_str_value()), + "defaultValue": lambda n : setattr(self, 'default_value', n.get_str_value()), + "editable": lambda n : setattr(self, 'editable', n.get_bool_value()), + "hidden": lambda n : setattr(self, 'hidden', n.get_bool_value()), + "inputType": lambda n : setattr(self, 'input_type', n.get_enum_value(AuthenticationAttributeCollectionInputType)), + "label": lambda n : setattr(self, 'label', n.get_str_value()), + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "options": lambda n : setattr(self, 'options', n.get_collection_of_object_values(AuthenticationAttributeCollectionOptionConfiguration)), + "required": lambda n : setattr(self, 'required', n.get_bool_value()), + "validationRegEx": lambda n : setattr(self, 'validation_reg_ex', n.get_str_value()), + "writeToDirectory": lambda n : setattr(self, 'write_to_directory', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("attribute", self.attribute) + writer.write_str_value("defaultValue", self.default_value) + writer.write_bool_value("editable", self.editable) + writer.write_bool_value("hidden", self.hidden) + writer.write_enum_value("inputType", self.input_type) + writer.write_str_value("label", self.label) + writer.write_str_value("@odata.type", self.odata_type) + writer.write_collection_of_object_values("options", self.options) + writer.write_bool_value("required", self.required) + writer.write_str_value("validationRegEx", self.validation_reg_ex) + writer.write_bool_value("writeToDirectory", self.write_to_directory) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/authentication_attribute_collection_input_type.py b/msgraph/generated/models/authentication_attribute_collection_input_type.py new file mode 100644 index 00000000000..7dd309ad2b5 --- /dev/null +++ b/msgraph/generated/models/authentication_attribute_collection_input_type.py @@ -0,0 +1,9 @@ +from enum import Enum + +class AuthenticationAttributeCollectionInputType(str, Enum): + Text = "text", + RadioSingleSelect = "radioSingleSelect", + CheckboxMultiSelect = "checkboxMultiSelect", + Boolean = "boolean", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/authentication_attribute_collection_option_configuration.py b/msgraph/generated/models/authentication_attribute_collection_option_configuration.py new file mode 100644 index 00000000000..aa38ab98749 --- /dev/null +++ b/msgraph/generated/models/authentication_attribute_collection_option_configuration.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class AuthenticationAttributeCollectionOptionConfiguration(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The label of the option that will be displayed to user, unless overridden. + label: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + # The value of the option that will be stored. + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AuthenticationAttributeCollectionOptionConfiguration: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AuthenticationAttributeCollectionOptionConfiguration + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AuthenticationAttributeCollectionOptionConfiguration() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "label": lambda n : setattr(self, 'label', n.get_str_value()), + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("label", self.label) + writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/authentication_attribute_collection_page.py b/msgraph/generated/models/authentication_attribute_collection_page.py new file mode 100644 index 00000000000..645da46b8fe --- /dev/null +++ b/msgraph/generated/models/authentication_attribute_collection_page.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_attribute_collection_page_view_configuration import AuthenticationAttributeCollectionPageViewConfiguration + +@dataclass +class AuthenticationAttributeCollectionPage(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The OdataType property + odata_type: Optional[str] = None + # A collection of displays of the attribute collection page. + views: Optional[List[AuthenticationAttributeCollectionPageViewConfiguration]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AuthenticationAttributeCollectionPage: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AuthenticationAttributeCollectionPage + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AuthenticationAttributeCollectionPage() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_attribute_collection_page_view_configuration import AuthenticationAttributeCollectionPageViewConfiguration + + from .authentication_attribute_collection_page_view_configuration import AuthenticationAttributeCollectionPageViewConfiguration + + fields: Dict[str, Callable[[Any], None]] = { + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "views": lambda n : setattr(self, 'views', n.get_collection_of_object_values(AuthenticationAttributeCollectionPageViewConfiguration)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("@odata.type", self.odata_type) + writer.write_collection_of_object_values("views", self.views) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/authentication_attribute_collection_page_view_configuration.py b/msgraph/generated/models/authentication_attribute_collection_page_view_configuration.py new file mode 100644 index 00000000000..bad9784a0e4 --- /dev/null +++ b/msgraph/generated/models/authentication_attribute_collection_page_view_configuration.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_attribute_collection_input_configuration import AuthenticationAttributeCollectionInputConfiguration + +@dataclass +class AuthenticationAttributeCollectionPageViewConfiguration(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The description of the page. + description: Optional[str] = None + # The display configuration of attributes being collected on the attribute collection page. + inputs: Optional[List[AuthenticationAttributeCollectionInputConfiguration]] = None + # The OdataType property + odata_type: Optional[str] = None + # The title of the attribute collection page. + title: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AuthenticationAttributeCollectionPageViewConfiguration: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AuthenticationAttributeCollectionPageViewConfiguration + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AuthenticationAttributeCollectionPageViewConfiguration() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_attribute_collection_input_configuration import AuthenticationAttributeCollectionInputConfiguration + + from .authentication_attribute_collection_input_configuration import AuthenticationAttributeCollectionInputConfiguration + + fields: Dict[str, Callable[[Any], None]] = { + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "inputs": lambda n : setattr(self, 'inputs', n.get_collection_of_object_values(AuthenticationAttributeCollectionInputConfiguration)), + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + "title": lambda n : setattr(self, 'title', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("description", self.description) + writer.write_collection_of_object_values("inputs", self.inputs) + writer.write_str_value("@odata.type", self.odata_type) + writer.write_str_value("title", self.title) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/authentication_condition_application_collection_response.py b/msgraph/generated/models/authentication_condition_application_collection_response.py new file mode 100644 index 00000000000..c970bb712ff --- /dev/null +++ b/msgraph/generated/models/authentication_condition_application_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_condition_application import AuthenticationConditionApplication + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class AuthenticationConditionApplicationCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[AuthenticationConditionApplication]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AuthenticationConditionApplicationCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AuthenticationConditionApplicationCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AuthenticationConditionApplicationCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_condition_application import AuthenticationConditionApplication + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + from .authentication_condition_application import AuthenticationConditionApplication + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(AuthenticationConditionApplication)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/authentication_event_listener.py b/msgraph/generated/models/authentication_event_listener.py index 0b64ea89fcb..6193d7196d6 100644 --- a/msgraph/generated/models/authentication_event_listener.py +++ b/msgraph/generated/models/authentication_event_listener.py @@ -6,7 +6,11 @@ if TYPE_CHECKING: from .authentication_conditions import AuthenticationConditions from .entity import Entity + from .on_attribute_collection_listener import OnAttributeCollectionListener + from .on_authentication_method_load_start_listener import OnAuthenticationMethodLoadStartListener + from .on_interactive_auth_flow_start_listener import OnInteractiveAuthFlowStartListener from .on_token_issuance_start_listener import OnTokenIssuanceStartListener + from .on_user_create_start_listener import OnUserCreateStartListener from .entity import Entity @@ -32,10 +36,26 @@ def create_from_discriminator_value(parse_node: ParseNode) -> AuthenticationEven mapping_value = parse_node.get_child_node("@odata.type").get_str_value() except AttributeError: mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onAttributeCollectionListener".casefold(): + from .on_attribute_collection_listener import OnAttributeCollectionListener + + return OnAttributeCollectionListener() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onAuthenticationMethodLoadStartListener".casefold(): + from .on_authentication_method_load_start_listener import OnAuthenticationMethodLoadStartListener + + return OnAuthenticationMethodLoadStartListener() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onInteractiveAuthFlowStartListener".casefold(): + from .on_interactive_auth_flow_start_listener import OnInteractiveAuthFlowStartListener + + return OnInteractiveAuthFlowStartListener() if mapping_value and mapping_value.casefold() == "#microsoft.graph.onTokenIssuanceStartListener".casefold(): from .on_token_issuance_start_listener import OnTokenIssuanceStartListener return OnTokenIssuanceStartListener() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onUserCreateStartListener".casefold(): + from .on_user_create_start_listener import OnUserCreateStartListener + + return OnUserCreateStartListener() return AuthenticationEventListener() def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: @@ -45,11 +65,19 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: """ from .authentication_conditions import AuthenticationConditions from .entity import Entity + from .on_attribute_collection_listener import OnAttributeCollectionListener + from .on_authentication_method_load_start_listener import OnAuthenticationMethodLoadStartListener + from .on_interactive_auth_flow_start_listener import OnInteractiveAuthFlowStartListener from .on_token_issuance_start_listener import OnTokenIssuanceStartListener + from .on_user_create_start_listener import OnUserCreateStartListener from .authentication_conditions import AuthenticationConditions from .entity import Entity + from .on_attribute_collection_listener import OnAttributeCollectionListener + from .on_authentication_method_load_start_listener import OnAuthenticationMethodLoadStartListener + from .on_interactive_auth_flow_start_listener import OnInteractiveAuthFlowStartListener from .on_token_issuance_start_listener import OnTokenIssuanceStartListener + from .on_user_create_start_listener import OnUserCreateStartListener fields: Dict[str, Callable[[Any], None]] = { "authenticationEventsFlowId": lambda n : setattr(self, 'authentication_events_flow_id', n.get_str_value()), diff --git a/msgraph/generated/models/authentication_events_flow.py b/msgraph/generated/models/authentication_events_flow.py new file mode 100644 index 00000000000..e462bf9a607 --- /dev/null +++ b/msgraph/generated/models/authentication_events_flow.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_conditions import AuthenticationConditions + from .entity import Entity + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow + +from .entity import Entity + +@dataclass +class AuthenticationEventsFlow(Entity): + # The conditions representing the context of the authentication request that's used to decide whether the events policy is invoked. + conditions: Optional[AuthenticationConditions] = None + # The description of the events policy. + description: Optional[str] = None + # Required. The display name for the events policy. + display_name: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AuthenticationEventsFlow: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AuthenticationEventsFlow + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow".casefold(): + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow + + return ExternalUsersSelfServiceSignUpEventsFlow() + return AuthenticationEventsFlow() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_conditions import AuthenticationConditions + from .entity import Entity + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow + + from .authentication_conditions import AuthenticationConditions + from .entity import Entity + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow + + fields: Dict[str, Callable[[Any], None]] = { + "conditions": lambda n : setattr(self, 'conditions', n.get_object_value(AuthenticationConditions)), + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("conditions", self.conditions) + writer.write_str_value("description", self.description) + writer.write_str_value("displayName", self.display_name) + + diff --git a/msgraph/generated/models/authentication_events_flow_collection_response.py b/msgraph/generated/models/authentication_events_flow_collection_response.py new file mode 100644 index 00000000000..28ae79fc512 --- /dev/null +++ b/msgraph/generated/models/authentication_events_flow_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_events_flow import AuthenticationEventsFlow + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class AuthenticationEventsFlowCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[AuthenticationEventsFlow]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AuthenticationEventsFlowCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AuthenticationEventsFlowCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AuthenticationEventsFlowCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_events_flow import AuthenticationEventsFlow + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + from .authentication_events_flow import AuthenticationEventsFlow + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(AuthenticationEventsFlow)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/content_customization.py b/msgraph/generated/models/content_customization.py index 78b34b834ed..06524e50263 100644 --- a/msgraph/generated/models/content_customization.py +++ b/msgraph/generated/models/content_customization.py @@ -20,9 +20,9 @@ class ContentCustomization(AdditionalDataHolder, BackedModel, Parsable): attribute_collection_relative_url: Optional[str] = None # The OdataType property odata_type: Optional[str] = None - # The registrationCampaign property + # Represents content options to customize during MFA proofup interruptions. registration_campaign: Optional[List[KeyValue]] = None - # The registrationCampaignRelativeUrl property + # The relative URL of the content options to customize during MFA proofup interruptions. registration_campaign_relative_url: Optional[str] = None @staticmethod diff --git a/msgraph/generated/models/dictionary.py b/msgraph/generated/models/dictionary.py index 3b63fc1f37f..bab606e89ef 100644 --- a/msgraph/generated/models/dictionary.py +++ b/msgraph/generated/models/dictionary.py @@ -5,6 +5,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: + from .file_storage_container_custom_property_dictionary import FileStorageContainerCustomPropertyDictionary from .result_template_dictionary import ResultTemplateDictionary @dataclass @@ -30,6 +31,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Dictionary: mapping_value = parse_node.get_child_node("@odata.type").get_str_value() except AttributeError: mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.fileStorageContainerCustomPropertyDictionary".casefold(): + from .file_storage_container_custom_property_dictionary import FileStorageContainerCustomPropertyDictionary + + return FileStorageContainerCustomPropertyDictionary() if mapping_value and mapping_value.casefold() == "#microsoft.graph.resultTemplateDictionary".casefold(): from .result_template_dictionary import ResultTemplateDictionary @@ -41,8 +46,10 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from .file_storage_container_custom_property_dictionary import FileStorageContainerCustomPropertyDictionary from .result_template_dictionary import ResultTemplateDictionary + from .file_storage_container_custom_property_dictionary import FileStorageContainerCustomPropertyDictionary from .result_template_dictionary import ResultTemplateDictionary fields: Dict[str, Callable[[Any], None]] = { diff --git a/msgraph/generated/models/entity.py b/msgraph/generated/models/entity.py index a83a924a2aa..b48421a46cf 100644 --- a/msgraph/generated/models/entity.py +++ b/msgraph/generated/models/entity.py @@ -85,6 +85,7 @@ from .authentication import Authentication from .authentication_combination_configuration import AuthenticationCombinationConfiguration from .authentication_context_class_reference import AuthenticationContextClassReference + from .authentication_events_flow import AuthenticationEventsFlow from .authentication_event_listener import AuthenticationEventListener from .authentication_flows_policy import AuthenticationFlowsPolicy from .authentication_method import AuthenticationMethod @@ -295,6 +296,7 @@ from .external_connectors.identity import Identity from .external_connectors.schema import Schema from .external_domain_name import ExternalDomainName + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow from .e_book_install_summary import EBookInstallSummary from .feature_rollout_policy import FeatureRolloutPolicy from .federated_identity_credential import FederatedIdentityCredential @@ -304,6 +306,8 @@ from .field_value_set import FieldValueSet from .file_assessment_request import FileAssessmentRequest from .file_attachment import FileAttachment + from .file_storage import FileStorage + from .file_storage_container import FileStorageContainer from .filter_operator_schema import FilterOperatorSchema from .governance_insight import GovernanceInsight from .group import Group @@ -459,10 +463,14 @@ from .onenote_section import OnenoteSection from .online_meeting import OnlineMeeting from .online_meeting_base import OnlineMeetingBase + from .on_attribute_collection_listener import OnAttributeCollectionListener + from .on_authentication_method_load_start_listener import OnAuthenticationMethodLoadStartListener + from .on_interactive_auth_flow_start_listener import OnInteractiveAuthFlowStartListener from .on_premises_conditional_access_settings import OnPremisesConditionalAccessSettings from .on_premises_directory_synchronization import OnPremisesDirectorySynchronization from .on_token_issuance_start_custom_extension import OnTokenIssuanceStartCustomExtension from .on_token_issuance_start_listener import OnTokenIssuanceStartListener + from .on_user_create_start_listener import OnUserCreateStartListener from .open_shift import OpenShift from .open_shift_change_request import OpenShiftChangeRequest from .open_type_extension import OpenTypeExtension @@ -1254,6 +1262,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Entity: from .authentication_event_listener import AuthenticationEventListener return AuthenticationEventListener() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.authenticationEventsFlow".casefold(): + from .authentication_events_flow import AuthenticationEventsFlow + + return AuthenticationEventsFlow() if mapping_value and mapping_value.casefold() == "#microsoft.graph.authenticationFlowsPolicy".casefold(): from .authentication_flows_policy import AuthenticationFlowsPolicy @@ -2094,6 +2106,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Entity: from .external_domain_name import ExternalDomainName return ExternalDomainName() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow".casefold(): + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow + + return ExternalUsersSelfServiceSignUpEventsFlow() if mapping_value and mapping_value.casefold() == "#microsoft.graph.featureRolloutPolicy".casefold(): from .feature_rollout_policy import FeatureRolloutPolicy @@ -2126,6 +2142,14 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Entity: from .file_attachment import FileAttachment return FileAttachment() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.fileStorage".casefold(): + from .file_storage import FileStorage + + return FileStorage() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.fileStorageContainer".casefold(): + from .file_storage_container import FileStorageContainer + + return FileStorageContainer() if mapping_value and mapping_value.casefold() == "#microsoft.graph.filterOperatorSchema".casefold(): from .filter_operator_schema import FilterOperatorSchema @@ -2712,6 +2736,14 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Entity: from .office_graph_insights import OfficeGraphInsights return OfficeGraphInsights() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onAttributeCollectionListener".casefold(): + from .on_attribute_collection_listener import OnAttributeCollectionListener + + return OnAttributeCollectionListener() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onAuthenticationMethodLoadStartListener".casefold(): + from .on_authentication_method_load_start_listener import OnAuthenticationMethodLoadStartListener + + return OnAuthenticationMethodLoadStartListener() if mapping_value and mapping_value.casefold() == "#microsoft.graph.onenote".casefold(): from .onenote import Onenote @@ -2744,6 +2776,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Entity: from .onenote_section import OnenoteSection return OnenoteSection() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onInteractiveAuthFlowStartListener".casefold(): + from .on_interactive_auth_flow_start_listener import OnInteractiveAuthFlowStartListener + + return OnInteractiveAuthFlowStartListener() if mapping_value and mapping_value.casefold() == "#microsoft.graph.onlineMeeting".casefold(): from .online_meeting import OnlineMeeting @@ -2768,6 +2804,10 @@ def create_from_discriminator_value(parse_node: ParseNode) -> Entity: from .on_token_issuance_start_listener import OnTokenIssuanceStartListener return OnTokenIssuanceStartListener() + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onUserCreateStartListener".casefold(): + from .on_user_create_start_listener import OnUserCreateStartListener + + return OnUserCreateStartListener() if mapping_value and mapping_value.casefold() == "#microsoft.graph.openShift".casefold(): from .open_shift import OpenShift @@ -4616,6 +4656,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .authentication import Authentication from .authentication_combination_configuration import AuthenticationCombinationConfiguration from .authentication_context_class_reference import AuthenticationContextClassReference + from .authentication_events_flow import AuthenticationEventsFlow from .authentication_event_listener import AuthenticationEventListener from .authentication_flows_policy import AuthenticationFlowsPolicy from .authentication_method import AuthenticationMethod @@ -4826,6 +4867,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_connectors.identity import Identity from .external_connectors.schema import Schema from .external_domain_name import ExternalDomainName + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow from .e_book_install_summary import EBookInstallSummary from .feature_rollout_policy import FeatureRolloutPolicy from .federated_identity_credential import FederatedIdentityCredential @@ -4835,6 +4877,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .field_value_set import FieldValueSet from .file_assessment_request import FileAssessmentRequest from .file_attachment import FileAttachment + from .file_storage import FileStorage + from .file_storage_container import FileStorageContainer from .filter_operator_schema import FilterOperatorSchema from .governance_insight import GovernanceInsight from .group import Group @@ -4990,10 +5034,14 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .onenote_section import OnenoteSection from .online_meeting import OnlineMeeting from .online_meeting_base import OnlineMeetingBase + from .on_attribute_collection_listener import OnAttributeCollectionListener + from .on_authentication_method_load_start_listener import OnAuthenticationMethodLoadStartListener + from .on_interactive_auth_flow_start_listener import OnInteractiveAuthFlowStartListener from .on_premises_conditional_access_settings import OnPremisesConditionalAccessSettings from .on_premises_directory_synchronization import OnPremisesDirectorySynchronization from .on_token_issuance_start_custom_extension import OnTokenIssuanceStartCustomExtension from .on_token_issuance_start_listener import OnTokenIssuanceStartListener + from .on_user_create_start_listener import OnUserCreateStartListener from .open_shift import OpenShift from .open_shift_change_request import OpenShiftChangeRequest from .open_type_extension import OpenTypeExtension @@ -5515,6 +5563,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .authentication import Authentication from .authentication_combination_configuration import AuthenticationCombinationConfiguration from .authentication_context_class_reference import AuthenticationContextClassReference + from .authentication_events_flow import AuthenticationEventsFlow from .authentication_event_listener import AuthenticationEventListener from .authentication_flows_policy import AuthenticationFlowsPolicy from .authentication_method import AuthenticationMethod @@ -5725,6 +5774,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .external_connectors.identity import Identity from .external_connectors.schema import Schema from .external_domain_name import ExternalDomainName + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow from .e_book_install_summary import EBookInstallSummary from .feature_rollout_policy import FeatureRolloutPolicy from .federated_identity_credential import FederatedIdentityCredential @@ -5734,6 +5784,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .field_value_set import FieldValueSet from .file_assessment_request import FileAssessmentRequest from .file_attachment import FileAttachment + from .file_storage import FileStorage + from .file_storage_container import FileStorageContainer from .filter_operator_schema import FilterOperatorSchema from .governance_insight import GovernanceInsight from .group import Group @@ -5889,10 +5941,14 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .onenote_section import OnenoteSection from .online_meeting import OnlineMeeting from .online_meeting_base import OnlineMeetingBase + from .on_attribute_collection_listener import OnAttributeCollectionListener + from .on_authentication_method_load_start_listener import OnAuthenticationMethodLoadStartListener + from .on_interactive_auth_flow_start_listener import OnInteractiveAuthFlowStartListener from .on_premises_conditional_access_settings import OnPremisesConditionalAccessSettings from .on_premises_directory_synchronization import OnPremisesDirectorySynchronization from .on_token_issuance_start_custom_extension import OnTokenIssuanceStartCustomExtension from .on_token_issuance_start_listener import OnTokenIssuanceStartListener + from .on_user_create_start_listener import OnUserCreateStartListener from .open_shift import OpenShift from .open_shift_change_request import OpenShiftChangeRequest from .open_type_extension import OpenTypeExtension diff --git a/msgraph/generated/models/external_users_self_service_sign_up_events_flow.py b/msgraph/generated/models/external_users_self_service_sign_up_events_flow.py new file mode 100644 index 00000000000..cf89820e491 --- /dev/null +++ b/msgraph/generated/models/external_users_self_service_sign_up_events_flow.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_events_flow import AuthenticationEventsFlow + from .on_attribute_collection_handler import OnAttributeCollectionHandler + from .on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + from .on_interactive_auth_flow_start_handler import OnInteractiveAuthFlowStartHandler + from .on_user_create_start_handler import OnUserCreateStartHandler + +from .authentication_events_flow import AuthenticationEventsFlow + +@dataclass +class ExternalUsersSelfServiceSignUpEventsFlow(AuthenticationEventsFlow): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.externalUsersSelfServiceSignUpEventsFlow" + # The configuration for what to invoke when attributes are ready to be collected from the user. + on_attribute_collection: Optional[OnAttributeCollectionHandler] = None + # Required. The configuration for what to invoke when authentication methods are ready to be presented to the user. Must have at least one identity provider linked. + on_authentication_method_load_start: Optional[OnAuthenticationMethodLoadStartHandler] = None + # Required. The configuration for what to invoke when an authentication flow is ready to be initiated. + on_interactive_auth_flow_start: Optional[OnInteractiveAuthFlowStartHandler] = None + # The configuration for what to invoke during user creation. + on_user_create_start: Optional[OnUserCreateStartHandler] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ExternalUsersSelfServiceSignUpEventsFlow: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ExternalUsersSelfServiceSignUpEventsFlow + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ExternalUsersSelfServiceSignUpEventsFlow() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_events_flow import AuthenticationEventsFlow + from .on_attribute_collection_handler import OnAttributeCollectionHandler + from .on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + from .on_interactive_auth_flow_start_handler import OnInteractiveAuthFlowStartHandler + from .on_user_create_start_handler import OnUserCreateStartHandler + + from .authentication_events_flow import AuthenticationEventsFlow + from .on_attribute_collection_handler import OnAttributeCollectionHandler + from .on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + from .on_interactive_auth_flow_start_handler import OnInteractiveAuthFlowStartHandler + from .on_user_create_start_handler import OnUserCreateStartHandler + + fields: Dict[str, Callable[[Any], None]] = { + "onAttributeCollection": lambda n : setattr(self, 'on_attribute_collection', n.get_object_value(OnAttributeCollectionHandler)), + "onAuthenticationMethodLoadStart": lambda n : setattr(self, 'on_authentication_method_load_start', n.get_object_value(OnAuthenticationMethodLoadStartHandler)), + "onInteractiveAuthFlowStart": lambda n : setattr(self, 'on_interactive_auth_flow_start', n.get_object_value(OnInteractiveAuthFlowStartHandler)), + "onUserCreateStart": lambda n : setattr(self, 'on_user_create_start', n.get_object_value(OnUserCreateStartHandler)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("onAttributeCollection", self.on_attribute_collection) + writer.write_object_value("onAuthenticationMethodLoadStart", self.on_authentication_method_load_start) + writer.write_object_value("onInteractiveAuthFlowStart", self.on_interactive_auth_flow_start) + writer.write_object_value("onUserCreateStart", self.on_user_create_start) + + diff --git a/msgraph/generated/models/external_users_self_service_sign_up_events_flow_collection_response.py b/msgraph/generated/models/external_users_self_service_sign_up_events_flow_collection_response.py new file mode 100644 index 00000000000..f43e8a90e93 --- /dev/null +++ b/msgraph/generated/models/external_users_self_service_sign_up_events_flow_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ExternalUsersSelfServiceSignUpEventsFlow]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ExternalUsersSelfServiceSignUpEventsFlowCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .external_users_self_service_sign_up_events_flow import ExternalUsersSelfServiceSignUpEventsFlow + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ExternalUsersSelfServiceSignUpEventsFlow)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/file_storage.py b/msgraph/generated/models/file_storage.py new file mode 100644 index 00000000000..9d78b8ff2cf --- /dev/null +++ b/msgraph/generated/models/file_storage.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .entity import Entity + from .file_storage_container import FileStorageContainer + +from .entity import Entity + +@dataclass +class FileStorage(Entity): + # The containers property + containers: Optional[List[FileStorageContainer]] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FileStorage: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FileStorage + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FileStorage() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .entity import Entity + from .file_storage_container import FileStorageContainer + + from .entity import Entity + from .file_storage_container import FileStorageContainer + + fields: Dict[str, Callable[[Any], None]] = { + "containers": lambda n : setattr(self, 'containers', n.get_collection_of_object_values(FileStorageContainer)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("containers", self.containers) + + diff --git a/msgraph/generated/models/file_storage_container.py b/msgraph/generated/models/file_storage_container.py new file mode 100644 index 00000000000..1545224156d --- /dev/null +++ b/msgraph/generated/models/file_storage_container.py @@ -0,0 +1,105 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from uuid import UUID + +if TYPE_CHECKING: + from .drive import Drive + from .entity import Entity + from .file_storage_container_custom_property_dictionary import FileStorageContainerCustomPropertyDictionary + from .file_storage_container_status import FileStorageContainerStatus + from .file_storage_container_viewpoint import FileStorageContainerViewpoint + from .permission import Permission + +from .entity import Entity + +@dataclass +class FileStorageContainer(Entity): + # Container type ID of the fileStorageContainer. For details about container types, see Container Types. Each container must have only one container type. Read-only. + container_type_id: Optional[UUID] = None + # Date and time of the fileStorageContainer creation. Read-only. + created_date_time: Optional[datetime.datetime] = None + # Custom property collection for the fileStorageContainer. Read-write. + custom_properties: Optional[FileStorageContainerCustomPropertyDictionary] = None + # Provides a user-visible description of the fileStorageContainer. Read-write. + description: Optional[str] = None + # The display name of the fileStorageContainer. Read-write. + display_name: Optional[str] = None + # The drive of the resource fileStorageContainer. Read-only. + drive: Optional[Drive] = None + # The OdataType property + odata_type: Optional[str] = None + # The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are 'reader', 'writer', 'manager', and 'owner'. Read-write. + permissions: Optional[List[Permission]] = None + # Status of the fileStorageContainer. Containers are created as inactive and require activation. Inactive containers are subjected to automatic deletion in 24 hours. The possible values are: inactive, active. Read-only. + status: Optional[FileStorageContainerStatus] = None + # Data specific to the current user. Read-only. + viewpoint: Optional[FileStorageContainerViewpoint] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FileStorageContainer: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FileStorageContainer + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FileStorageContainer() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .drive import Drive + from .entity import Entity + from .file_storage_container_custom_property_dictionary import FileStorageContainerCustomPropertyDictionary + from .file_storage_container_status import FileStorageContainerStatus + from .file_storage_container_viewpoint import FileStorageContainerViewpoint + from .permission import Permission + + from .drive import Drive + from .entity import Entity + from .file_storage_container_custom_property_dictionary import FileStorageContainerCustomPropertyDictionary + from .file_storage_container_status import FileStorageContainerStatus + from .file_storage_container_viewpoint import FileStorageContainerViewpoint + from .permission import Permission + + fields: Dict[str, Callable[[Any], None]] = { + "containerTypeId": lambda n : setattr(self, 'container_type_id', n.get_uuid_value()), + "createdDateTime": lambda n : setattr(self, 'created_date_time', n.get_datetime_value()), + "customProperties": lambda n : setattr(self, 'custom_properties', n.get_object_value(FileStorageContainerCustomPropertyDictionary)), + "description": lambda n : setattr(self, 'description', n.get_str_value()), + "displayName": lambda n : setattr(self, 'display_name', n.get_str_value()), + "drive": lambda n : setattr(self, 'drive', n.get_object_value(Drive)), + "permissions": lambda n : setattr(self, 'permissions', n.get_collection_of_object_values(Permission)), + "status": lambda n : setattr(self, 'status', n.get_enum_value(FileStorageContainerStatus)), + "viewpoint": lambda n : setattr(self, 'viewpoint', n.get_object_value(FileStorageContainerViewpoint)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_uuid_value("containerTypeId", self.container_type_id) + writer.write_datetime_value("createdDateTime", self.created_date_time) + writer.write_object_value("customProperties", self.custom_properties) + writer.write_str_value("description", self.description) + writer.write_str_value("displayName", self.display_name) + writer.write_object_value("drive", self.drive) + writer.write_collection_of_object_values("permissions", self.permissions) + writer.write_enum_value("status", self.status) + writer.write_object_value("viewpoint", self.viewpoint) + + diff --git a/msgraph/generated/models/file_storage_container_collection_response.py b/msgraph/generated/models/file_storage_container_collection_response.py new file mode 100644 index 00000000000..f726198ba9d --- /dev/null +++ b/msgraph/generated/models/file_storage_container_collection_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .file_storage_container import FileStorageContainer + +from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class FileStorageContainerCollectionResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[FileStorageContainer]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FileStorageContainerCollectionResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FileStorageContainerCollectionResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FileStorageContainerCollectionResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .file_storage_container import FileStorageContainer + + from .base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .file_storage_container import FileStorageContainer + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(FileStorageContainer)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/models/file_storage_container_custom_property_dictionary.py b/msgraph/generated/models/file_storage_container_custom_property_dictionary.py new file mode 100644 index 00000000000..1c57967a103 --- /dev/null +++ b/msgraph/generated/models/file_storage_container_custom_property_dictionary.py @@ -0,0 +1,52 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .dictionary import Dictionary + +from .dictionary import Dictionary + +@dataclass +class FileStorageContainerCustomPropertyDictionary(Dictionary): + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FileStorageContainerCustomPropertyDictionary: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FileStorageContainerCustomPropertyDictionary + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FileStorageContainerCustomPropertyDictionary() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .dictionary import Dictionary + + from .dictionary import Dictionary + + fields: Dict[str, Callable[[Any], None]] = { + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + + diff --git a/msgraph/generated/models/file_storage_container_status.py b/msgraph/generated/models/file_storage_container_status.py new file mode 100644 index 00000000000..5406f38110e --- /dev/null +++ b/msgraph/generated/models/file_storage_container_status.py @@ -0,0 +1,7 @@ +from enum import Enum + +class FileStorageContainerStatus(str, Enum): + Inactive = "inactive", + Active = "active", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/file_storage_container_viewpoint.py b/msgraph/generated/models/file_storage_container_viewpoint.py new file mode 100644 index 00000000000..10c28861439 --- /dev/null +++ b/msgraph/generated/models/file_storage_container_viewpoint.py @@ -0,0 +1,53 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class FileStorageContainerViewpoint(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The current user's effective role. Read-only. + effective_role: Optional[str] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FileStorageContainerViewpoint: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FileStorageContainerViewpoint + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FileStorageContainerViewpoint() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "effectiveRole": lambda n : setattr(self, 'effective_role', n.get_str_value()), + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("effectiveRole", self.effective_role) + writer.write_str_value("@odata.type", self.odata_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/identity_container.py b/msgraph/generated/models/identity_container.py index 81c7ad25b0b..c48e6dbaea4 100644 --- a/msgraph/generated/models/identity_container.py +++ b/msgraph/generated/models/identity_container.py @@ -4,6 +4,7 @@ from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union if TYPE_CHECKING: + from .authentication_events_flow import AuthenticationEventsFlow from .authentication_event_listener import AuthenticationEventListener from .b2x_identity_user_flow import B2xIdentityUserFlow from .conditional_access_root import ConditionalAccessRoot @@ -21,6 +22,8 @@ class IdentityContainer(Entity): api_connectors: Optional[List[IdentityApiConnector]] = None # Represents listeners for custom authentication extension events in Azure AD for workforce and customers. authentication_event_listeners: Optional[List[AuthenticationEventListener]] = None + # Represents the entry point for self-service sign-up and sign-in user flows in both Microsoft Entra workforce and external tenants. + authentication_events_flows: Optional[List[AuthenticationEventsFlow]] = None # Represents entry point for B2X/self-service sign-up identity userflows. b2x_user_flows: Optional[List[B2xIdentityUserFlow]] = None # the entry point for the Conditional Access (CA) object model. @@ -50,6 +53,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: The deserialization information for the current model Returns: Dict[str, Callable[[ParseNode], None]] """ + from .authentication_events_flow import AuthenticationEventsFlow from .authentication_event_listener import AuthenticationEventListener from .b2x_identity_user_flow import B2xIdentityUserFlow from .conditional_access_root import ConditionalAccessRoot @@ -59,6 +63,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: from .identity_provider_base import IdentityProviderBase from .identity_user_flow_attribute import IdentityUserFlowAttribute + from .authentication_events_flow import AuthenticationEventsFlow from .authentication_event_listener import AuthenticationEventListener from .b2x_identity_user_flow import B2xIdentityUserFlow from .conditional_access_root import ConditionalAccessRoot @@ -71,6 +76,7 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: fields: Dict[str, Callable[[Any], None]] = { "apiConnectors": lambda n : setattr(self, 'api_connectors', n.get_collection_of_object_values(IdentityApiConnector)), "authenticationEventListeners": lambda n : setattr(self, 'authentication_event_listeners', n.get_collection_of_object_values(AuthenticationEventListener)), + "authenticationEventsFlows": lambda n : setattr(self, 'authentication_events_flows', n.get_collection_of_object_values(AuthenticationEventsFlow)), "b2xUserFlows": lambda n : setattr(self, 'b2x_user_flows', n.get_collection_of_object_values(B2xIdentityUserFlow)), "conditionalAccess": lambda n : setattr(self, 'conditional_access', n.get_object_value(ConditionalAccessRoot)), "customAuthenticationExtensions": lambda n : setattr(self, 'custom_authentication_extensions', n.get_collection_of_object_values(CustomAuthenticationExtension)), @@ -92,6 +98,7 @@ def serialize(self,writer: SerializationWriter) -> None: super().serialize(writer) writer.write_collection_of_object_values("apiConnectors", self.api_connectors) writer.write_collection_of_object_values("authenticationEventListeners", self.authentication_event_listeners) + writer.write_collection_of_object_values("authenticationEventsFlows", self.authentication_events_flows) writer.write_collection_of_object_values("b2xUserFlows", self.b2x_user_flows) writer.write_object_value("conditionalAccess", self.conditional_access) writer.write_collection_of_object_values("customAuthenticationExtensions", self.custom_authentication_extensions) diff --git a/msgraph/generated/models/identity_user_flow_attribute.py b/msgraph/generated/models/identity_user_flow_attribute.py index 4c2e83b6b7d..ef89306811b 100644 --- a/msgraph/generated/models/identity_user_flow_attribute.py +++ b/msgraph/generated/models/identity_user_flow_attribute.py @@ -16,7 +16,7 @@ class IdentityUserFlowAttribute(Entity): # The dataType property data_type: Optional[IdentityUserFlowAttributeDataType] = None - # The description of the user flow attribute that's shown to the user at the time of sign-up. + # The description of the user flow attribute that's shown to the user at the time of sign up. description: Optional[str] = None # The display name of the user flow attribute. Supports $filter (eq, ne). display_name: Optional[str] = None diff --git a/msgraph/generated/models/on_attribute_collection_external_users_self_service_sign_up.py b/msgraph/generated/models/on_attribute_collection_external_users_self_service_sign_up.py new file mode 100644 index 00000000000..b3ded7edb6b --- /dev/null +++ b/msgraph/generated/models/on_attribute_collection_external_users_self_service_sign_up.py @@ -0,0 +1,66 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_attribute_collection_page import AuthenticationAttributeCollectionPage + from .identity_user_flow_attribute import IdentityUserFlowAttribute + from .on_attribute_collection_handler import OnAttributeCollectionHandler + +from .on_attribute_collection_handler import OnAttributeCollectionHandler + +@dataclass +class OnAttributeCollectionExternalUsersSelfServiceSignUp(OnAttributeCollectionHandler): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp" + # Required. The configuration for how attributes are displayed in the sign up experience defined by a user flow, like the externalUsersSelfServiceSignupEventsFlow, specifically on the attribute collection page. + attribute_collection_page: Optional[AuthenticationAttributeCollectionPage] = None + # The attributes property + attributes: Optional[List[IdentityUserFlowAttribute]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnAttributeCollectionExternalUsersSelfServiceSignUp: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnAttributeCollectionExternalUsersSelfServiceSignUp + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OnAttributeCollectionExternalUsersSelfServiceSignUp() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_attribute_collection_page import AuthenticationAttributeCollectionPage + from .identity_user_flow_attribute import IdentityUserFlowAttribute + from .on_attribute_collection_handler import OnAttributeCollectionHandler + + from .authentication_attribute_collection_page import AuthenticationAttributeCollectionPage + from .identity_user_flow_attribute import IdentityUserFlowAttribute + from .on_attribute_collection_handler import OnAttributeCollectionHandler + + fields: Dict[str, Callable[[Any], None]] = { + "attributeCollectionPage": lambda n : setattr(self, 'attribute_collection_page', n.get_object_value(AuthenticationAttributeCollectionPage)), + "attributes": lambda n : setattr(self, 'attributes', n.get_collection_of_object_values(IdentityUserFlowAttribute)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("attributeCollectionPage", self.attribute_collection_page) + writer.write_collection_of_object_values("attributes", self.attributes) + + diff --git a/msgraph/generated/models/on_attribute_collection_handler.py b/msgraph/generated/models/on_attribute_collection_handler.py new file mode 100644 index 00000000000..4e1cb5e2d02 --- /dev/null +++ b/msgraph/generated/models/on_attribute_collection_handler.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .on_attribute_collection_external_users_self_service_sign_up import OnAttributeCollectionExternalUsersSelfServiceSignUp + +@dataclass +class OnAttributeCollectionHandler(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnAttributeCollectionHandler: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnAttributeCollectionHandler + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onAttributeCollectionExternalUsersSelfServiceSignUp".casefold(): + from .on_attribute_collection_external_users_self_service_sign_up import OnAttributeCollectionExternalUsersSelfServiceSignUp + + return OnAttributeCollectionExternalUsersSelfServiceSignUp() + return OnAttributeCollectionHandler() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .on_attribute_collection_external_users_self_service_sign_up import OnAttributeCollectionExternalUsersSelfServiceSignUp + + from .on_attribute_collection_external_users_self_service_sign_up import OnAttributeCollectionExternalUsersSelfServiceSignUp + + fields: Dict[str, Callable[[Any], None]] = { + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("@odata.type", self.odata_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/on_attribute_collection_listener.py b/msgraph/generated/models/on_attribute_collection_listener.py new file mode 100644 index 00000000000..83487e154af --- /dev/null +++ b/msgraph/generated/models/on_attribute_collection_listener.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_event_listener import AuthenticationEventListener + from .on_attribute_collection_handler import OnAttributeCollectionHandler + +from .authentication_event_listener import AuthenticationEventListener + +@dataclass +class OnAttributeCollectionListener(AuthenticationEventListener): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.onAttributeCollectionListener" + # Required. Configuration for what to invoke if the event resolves to this listener. + handler: Optional[OnAttributeCollectionHandler] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnAttributeCollectionListener: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnAttributeCollectionListener + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OnAttributeCollectionListener() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_event_listener import AuthenticationEventListener + from .on_attribute_collection_handler import OnAttributeCollectionHandler + + from .authentication_event_listener import AuthenticationEventListener + from .on_attribute_collection_handler import OnAttributeCollectionHandler + + fields: Dict[str, Callable[[Any], None]] = { + "handler": lambda n : setattr(self, 'handler', n.get_object_value(OnAttributeCollectionHandler)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("handler", self.handler) + + diff --git a/msgraph/generated/models/on_authentication_method_load_start_external_users_self_service_sign_up.py b/msgraph/generated/models/on_authentication_method_load_start_external_users_self_service_sign_up.py new file mode 100644 index 00000000000..3a41496950a --- /dev/null +++ b/msgraph/generated/models/on_authentication_method_load_start_external_users_self_service_sign_up.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .identity_provider_base import IdentityProviderBase + from .on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + +from .on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + +@dataclass +class OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp(OnAuthenticationMethodLoadStartHandler): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp" + # The identityProviders property + identity_providers: Optional[List[IdentityProviderBase]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .identity_provider_base import IdentityProviderBase + from .on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + + from .identity_provider_base import IdentityProviderBase + from .on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + + fields: Dict[str, Callable[[Any], None]] = { + "identityProviders": lambda n : setattr(self, 'identity_providers', n.get_collection_of_object_values(IdentityProviderBase)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("identityProviders", self.identity_providers) + + diff --git a/msgraph/generated/models/on_authentication_method_load_start_handler.py b/msgraph/generated/models/on_authentication_method_load_start_handler.py new file mode 100644 index 00000000000..f95b19120ee --- /dev/null +++ b/msgraph/generated/models/on_authentication_method_load_start_handler.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .on_authentication_method_load_start_external_users_self_service_sign_up import OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp + +@dataclass +class OnAuthenticationMethodLoadStartHandler(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnAuthenticationMethodLoadStartHandler: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnAuthenticationMethodLoadStartHandler + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp".casefold(): + from .on_authentication_method_load_start_external_users_self_service_sign_up import OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp + + return OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp() + return OnAuthenticationMethodLoadStartHandler() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .on_authentication_method_load_start_external_users_self_service_sign_up import OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp + + from .on_authentication_method_load_start_external_users_self_service_sign_up import OnAuthenticationMethodLoadStartExternalUsersSelfServiceSignUp + + fields: Dict[str, Callable[[Any], None]] = { + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("@odata.type", self.odata_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/on_authentication_method_load_start_listener.py b/msgraph/generated/models/on_authentication_method_load_start_listener.py new file mode 100644 index 00000000000..d6530bd392c --- /dev/null +++ b/msgraph/generated/models/on_authentication_method_load_start_listener.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_event_listener import AuthenticationEventListener + from .on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + +from .authentication_event_listener import AuthenticationEventListener + +@dataclass +class OnAuthenticationMethodLoadStartListener(AuthenticationEventListener): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.onAuthenticationMethodLoadStartListener" + # Required. Configuration for what to invoke if the event resolves to this listener. This lets us define potential handler configurations per-event. + handler: Optional[OnAuthenticationMethodLoadStartHandler] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnAuthenticationMethodLoadStartListener: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnAuthenticationMethodLoadStartListener + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OnAuthenticationMethodLoadStartListener() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_event_listener import AuthenticationEventListener + from .on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + + from .authentication_event_listener import AuthenticationEventListener + from .on_authentication_method_load_start_handler import OnAuthenticationMethodLoadStartHandler + + fields: Dict[str, Callable[[Any], None]] = { + "handler": lambda n : setattr(self, 'handler', n.get_object_value(OnAuthenticationMethodLoadStartHandler)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("handler", self.handler) + + diff --git a/msgraph/generated/models/on_interactive_auth_flow_start_external_users_self_service_sign_up.py b/msgraph/generated/models/on_interactive_auth_flow_start_external_users_self_service_sign_up.py new file mode 100644 index 00000000000..5688256ccd0 --- /dev/null +++ b/msgraph/generated/models/on_interactive_auth_flow_start_external_users_self_service_sign_up.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .on_interactive_auth_flow_start_handler import OnInteractiveAuthFlowStartHandler + +from .on_interactive_auth_flow_start_handler import OnInteractiveAuthFlowStartHandler + +@dataclass +class OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp(OnInteractiveAuthFlowStartHandler): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.onInteractiveAuthFlowStartExternalUsersSelfServiceSignUp" + # Optional. Specifies whether the authentication flow includes an option to sign up (create account) and sign in. Default value is false meaning only sign in is enabled. + is_sign_up_allowed: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .on_interactive_auth_flow_start_handler import OnInteractiveAuthFlowStartHandler + + from .on_interactive_auth_flow_start_handler import OnInteractiveAuthFlowStartHandler + + fields: Dict[str, Callable[[Any], None]] = { + "isSignUpAllowed": lambda n : setattr(self, 'is_sign_up_allowed', n.get_bool_value()), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_bool_value("isSignUpAllowed", self.is_sign_up_allowed) + + diff --git a/msgraph/generated/models/on_interactive_auth_flow_start_handler.py b/msgraph/generated/models/on_interactive_auth_flow_start_handler.py new file mode 100644 index 00000000000..ee2cf4a068b --- /dev/null +++ b/msgraph/generated/models/on_interactive_auth_flow_start_handler.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .on_interactive_auth_flow_start_external_users_self_service_sign_up import OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp + +@dataclass +class OnInteractiveAuthFlowStartHandler(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnInteractiveAuthFlowStartHandler: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnInteractiveAuthFlowStartHandler + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onInteractiveAuthFlowStartExternalUsersSelfServiceSignUp".casefold(): + from .on_interactive_auth_flow_start_external_users_self_service_sign_up import OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp + + return OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp() + return OnInteractiveAuthFlowStartHandler() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .on_interactive_auth_flow_start_external_users_self_service_sign_up import OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp + + from .on_interactive_auth_flow_start_external_users_self_service_sign_up import OnInteractiveAuthFlowStartExternalUsersSelfServiceSignUp + + fields: Dict[str, Callable[[Any], None]] = { + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("@odata.type", self.odata_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/on_interactive_auth_flow_start_listener.py b/msgraph/generated/models/on_interactive_auth_flow_start_listener.py new file mode 100644 index 00000000000..fa4df0299a3 --- /dev/null +++ b/msgraph/generated/models/on_interactive_auth_flow_start_listener.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_event_listener import AuthenticationEventListener + from .on_interactive_auth_flow_start_handler import OnInteractiveAuthFlowStartHandler + +from .authentication_event_listener import AuthenticationEventListener + +@dataclass +class OnInteractiveAuthFlowStartListener(AuthenticationEventListener): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.onInteractiveAuthFlowStartListener" + # Required. Configuration for what to invoke if the event resolves to this listener. This lets us define potential handler configurations per-event. + handler: Optional[OnInteractiveAuthFlowStartHandler] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnInteractiveAuthFlowStartListener: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnInteractiveAuthFlowStartListener + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OnInteractiveAuthFlowStartListener() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_event_listener import AuthenticationEventListener + from .on_interactive_auth_flow_start_handler import OnInteractiveAuthFlowStartHandler + + from .authentication_event_listener import AuthenticationEventListener + from .on_interactive_auth_flow_start_handler import OnInteractiveAuthFlowStartHandler + + fields: Dict[str, Callable[[Any], None]] = { + "handler": lambda n : setattr(self, 'handler', n.get_object_value(OnInteractiveAuthFlowStartHandler)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("handler", self.handler) + + diff --git a/msgraph/generated/models/on_user_create_start_external_users_self_service_sign_up.py b/msgraph/generated/models/on_user_create_start_external_users_self_service_sign_up.py new file mode 100644 index 00000000000..4b5b872ac6a --- /dev/null +++ b/msgraph/generated/models/on_user_create_start_external_users_self_service_sign_up.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .on_user_create_start_handler import OnUserCreateStartHandler + from .user_type import UserType + +from .on_user_create_start_handler import OnUserCreateStartHandler + +@dataclass +class OnUserCreateStartExternalUsersSelfServiceSignUp(OnUserCreateStartHandler): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.onUserCreateStartExternalUsersSelfServiceSignUp" + # The type of user to create. Maps to userType property of user object. The possible values are: member, guest, unknownFutureValue. + user_type_to_create: Optional[UserType] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnUserCreateStartExternalUsersSelfServiceSignUp: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnUserCreateStartExternalUsersSelfServiceSignUp + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OnUserCreateStartExternalUsersSelfServiceSignUp() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .on_user_create_start_handler import OnUserCreateStartHandler + from .user_type import UserType + + from .on_user_create_start_handler import OnUserCreateStartHandler + from .user_type import UserType + + fields: Dict[str, Callable[[Any], None]] = { + "userTypeToCreate": lambda n : setattr(self, 'user_type_to_create', n.get_enum_value(UserType)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_enum_value("userTypeToCreate", self.user_type_to_create) + + diff --git a/msgraph/generated/models/on_user_create_start_handler.py b/msgraph/generated/models/on_user_create_start_handler.py new file mode 100644 index 00000000000..bcb6165db45 --- /dev/null +++ b/msgraph/generated/models/on_user_create_start_handler.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .on_user_create_start_external_users_self_service_sign_up import OnUserCreateStartExternalUsersSelfServiceSignUp + +@dataclass +class OnUserCreateStartHandler(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnUserCreateStartHandler: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnUserCreateStartHandler + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + try: + mapping_value = parse_node.get_child_node("@odata.type").get_str_value() + except AttributeError: + mapping_value = None + if mapping_value and mapping_value.casefold() == "#microsoft.graph.onUserCreateStartExternalUsersSelfServiceSignUp".casefold(): + from .on_user_create_start_external_users_self_service_sign_up import OnUserCreateStartExternalUsersSelfServiceSignUp + + return OnUserCreateStartExternalUsersSelfServiceSignUp() + return OnUserCreateStartHandler() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .on_user_create_start_external_users_self_service_sign_up import OnUserCreateStartExternalUsersSelfServiceSignUp + + from .on_user_create_start_external_users_self_service_sign_up import OnUserCreateStartExternalUsersSelfServiceSignUp + + fields: Dict[str, Callable[[Any], None]] = { + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("@odata.type", self.odata_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/on_user_create_start_listener.py b/msgraph/generated/models/on_user_create_start_listener.py new file mode 100644 index 00000000000..2f608342909 --- /dev/null +++ b/msgraph/generated/models/on_user_create_start_listener.py @@ -0,0 +1,59 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .authentication_event_listener import AuthenticationEventListener + from .on_user_create_start_handler import OnUserCreateStartHandler + +from .authentication_event_listener import AuthenticationEventListener + +@dataclass +class OnUserCreateStartListener(AuthenticationEventListener): + # The OdataType property + odata_type: Optional[str] = "#microsoft.graph.onUserCreateStartListener" + # Required. Configuration for what to invoke if the event resolves to this listener. This lets us define potential handler configurations per-event. + handler: Optional[OnUserCreateStartHandler] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OnUserCreateStartListener: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OnUserCreateStartListener + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OnUserCreateStartListener() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .authentication_event_listener import AuthenticationEventListener + from .on_user_create_start_handler import OnUserCreateStartHandler + + from .authentication_event_listener import AuthenticationEventListener + from .on_user_create_start_handler import OnUserCreateStartHandler + + fields: Dict[str, Callable[[Any], None]] = { + "handler": lambda n : setattr(self, 'handler', n.get_object_value(OnUserCreateStartHandler)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_object_value("handler", self.handler) + + diff --git a/msgraph/generated/models/organizational_branding_properties.py b/msgraph/generated/models/organizational_branding_properties.py index 3b6a3195b62..18531b0d72d 100644 --- a/msgraph/generated/models/organizational_branding_properties.py +++ b/msgraph/generated/models/organizational_branding_properties.py @@ -17,7 +17,7 @@ class OrganizationalBrandingProperties(Entity): # Color that appears in place of the background image in low-bandwidth connections. We recommend that you use the primary color of your banner logo or your organization color. Specify this in hexadecimal format, for example, white is #FFFFFF. background_color: Optional[str] = None - # Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + # Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. background_image: Optional[bytes] = None # A relative URL for the backgroundImage property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. background_image_relative_url: Optional[str] = None @@ -27,7 +27,7 @@ class OrganizationalBrandingProperties(Entity): banner_logo_relative_url: Optional[str] = None # A list of base URLs for all available CDN providers that are serving the assets of the current resource. Several CDN providers are used at the same time for high availability of read requests. Read-only. cdn_list: Optional[List[str]] = None - # The contentCustomization property + # Represents the content options to be customized throughout the authentication flow for a tenant. NOTE: Supported by Microsoft Entra External ID in external tenants only. content_customization: Optional[ContentCustomization] = None # A custom URL for resetting account credentials. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128 characters. custom_account_reset_credentials_url: Optional[str] = None diff --git a/msgraph/generated/models/sign_in_activity.py b/msgraph/generated/models/sign_in_activity.py index 67bfa33a724..314f7f64081 100644 --- a/msgraph/generated/models/sign_in_activity.py +++ b/msgraph/generated/models/sign_in_activity.py @@ -12,14 +12,18 @@ class SignInActivity(AdditionalDataHolder, BackedModel, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additional_data: Dict[str, Any] = field(default_factory=dict) - # The last non-interactive sign-in date for a specific user. You can use this field to calculate the last time a client attempted (either successfully or unsuccessfully) to sign in to the directory on behalf of a user. Because some users may use clients to access tenant resources rather than signing into your tenant directly, you can use the non-interactive sign-in date to along with lastSignInDateTime to identify inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Microsoft Entra ID maintains non-interactive sign-ins going back to May 2020. For more information about using the value of this property, see Manage inactive user accounts in Microsoft Entra ID. + # The last non-interactive sign-in date for a specific user. You can use this field to calculate the last time a client attempted (either successfully or unsuccessfully) to sign in to the directory on behalf of a user. Because some users may use clients to access tenant resources rather than signing into your tenant directly, you can use the non-interactive sign-in date to along with lastSignInDateTime to identify inactive users. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Microsoft Entra ID maintains non-interactive sign-ins going back to May 2020. For more information about using the value of this property, see Manage inactive user accounts in Microsoft Entra ID. last_non_interactive_sign_in_date_time: Optional[datetime.datetime] = None # Request identifier of the last non-interactive sign-in performed by this user. last_non_interactive_sign_in_request_id: Optional[str] = None - # The last interactive sign-in date and time for a specific user. You can use this field to calculate the last time a user attempted (either successfully or unsuccessfully) to sign in to the directory with an interactive authentication method. This field can be used to build reports, such as inactive users. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is: '2014-01-01T00:00:00Z'. Microsoft Entra ID maintains interactive sign-ins going back to April 2020. For more information about using the value of this property, see Manage inactive user accounts in Microsoft Entra ID. + # The last interactive sign-in date and time for a specific user. You can use this field to calculate the last time a user attempted (either successfully or unsuccessfully) to sign in to the directory with an interactive authentication method. This field can be used to build reports, such as inactive users. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Microsoft Entra ID maintains interactive sign-ins going back to April 2020. For more information about using the value of this property, see Manage inactive user accounts in Microsoft Entra ID. last_sign_in_date_time: Optional[datetime.datetime] = None # Request identifier of the last interactive sign-in performed by this user. last_sign_in_request_id: Optional[str] = None + # The date and time of the user's most recent successful sign-in activity. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + last_successful_sign_in_date_time: Optional[datetime.datetime] = None + # The request ID of the last successful sign-in. + last_successful_sign_in_request_id: Optional[str] = None # The OdataType property odata_type: Optional[str] = None @@ -44,6 +48,8 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: "lastNonInteractiveSignInRequestId": lambda n : setattr(self, 'last_non_interactive_sign_in_request_id', n.get_str_value()), "lastSignInDateTime": lambda n : setattr(self, 'last_sign_in_date_time', n.get_datetime_value()), "lastSignInRequestId": lambda n : setattr(self, 'last_sign_in_request_id', n.get_str_value()), + "lastSuccessfulSignInDateTime": lambda n : setattr(self, 'last_successful_sign_in_date_time', n.get_datetime_value()), + "lastSuccessfulSignInRequestId": lambda n : setattr(self, 'last_successful_sign_in_request_id', n.get_str_value()), "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), } return fields @@ -60,6 +66,8 @@ def serialize(self,writer: SerializationWriter) -> None: writer.write_str_value("lastNonInteractiveSignInRequestId", self.last_non_interactive_sign_in_request_id) writer.write_datetime_value("lastSignInDateTime", self.last_sign_in_date_time) writer.write_str_value("lastSignInRequestId", self.last_sign_in_request_id) + writer.write_datetime_value("lastSuccessfulSignInDateTime", self.last_successful_sign_in_date_time) + writer.write_str_value("lastSuccessfulSignInRequestId", self.last_successful_sign_in_request_id) writer.write_str_value("@odata.type", self.odata_type) writer.write_additional_data_value(self.additional_data) diff --git a/msgraph/generated/models/site_archival_details.py b/msgraph/generated/models/site_archival_details.py new file mode 100644 index 00000000000..6a23968be05 --- /dev/null +++ b/msgraph/generated/models/site_archival_details.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .site_archive_status import SiteArchiveStatus + +@dataclass +class SiteArchivalDetails(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The archiveStatus property + archive_status: Optional[SiteArchiveStatus] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SiteArchivalDetails: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SiteArchivalDetails + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SiteArchivalDetails() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .site_archive_status import SiteArchiveStatus + + from .site_archive_status import SiteArchiveStatus + + fields: Dict[str, Callable[[Any], None]] = { + "archiveStatus": lambda n : setattr(self, 'archive_status', n.get_enum_value(SiteArchiveStatus)), + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_enum_value("archiveStatus", self.archive_status) + writer.write_str_value("@odata.type", self.odata_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/site_archive_status.py b/msgraph/generated/models/site_archive_status.py new file mode 100644 index 00000000000..c92c95c7d57 --- /dev/null +++ b/msgraph/generated/models/site_archive_status.py @@ -0,0 +1,8 @@ +from enum import Enum + +class SiteArchiveStatus(str, Enum): + RecentlyArchived = "recentlyArchived", + FullyArchived = "fullyArchived", + Reactivating = "reactivating", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/models/site_collection.py b/msgraph/generated/models/site_collection.py index a716bc314f0..b88bb593a76 100644 --- a/msgraph/generated/models/site_collection.py +++ b/msgraph/generated/models/site_collection.py @@ -6,6 +6,7 @@ if TYPE_CHECKING: from .root import Root + from .site_archival_details import SiteArchivalDetails @dataclass class SiteCollection(AdditionalDataHolder, BackedModel, Parsable): @@ -14,6 +15,8 @@ class SiteCollection(AdditionalDataHolder, BackedModel, Parsable): # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. additional_data: Dict[str, Any] = field(default_factory=dict) + # The archivalDetails property + archival_details: Optional[SiteArchivalDetails] = None # The geographic region code for where this site collection resides. Only present for multi-geo tenants. Read-only. data_location_code: Optional[str] = None # The hostname for the site collection. Read-only. @@ -40,10 +43,13 @@ def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: Returns: Dict[str, Callable[[ParseNode], None]] """ from .root import Root + from .site_archival_details import SiteArchivalDetails from .root import Root + from .site_archival_details import SiteArchivalDetails fields: Dict[str, Callable[[Any], None]] = { + "archivalDetails": lambda n : setattr(self, 'archival_details', n.get_object_value(SiteArchivalDetails)), "dataLocationCode": lambda n : setattr(self, 'data_location_code', n.get_str_value()), "hostname": lambda n : setattr(self, 'hostname', n.get_str_value()), "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), @@ -59,6 +65,7 @@ def serialize(self,writer: SerializationWriter) -> None: """ if not writer: raise TypeError("writer cannot be null.") + writer.write_object_value("archivalDetails", self.archival_details) writer.write_str_value("dataLocationCode", self.data_location_code) writer.write_str_value("hostname", self.hostname) writer.write_str_value("@odata.type", self.odata_type) diff --git a/msgraph/generated/models/storage.py b/msgraph/generated/models/storage.py new file mode 100644 index 00000000000..a55fc2c3659 --- /dev/null +++ b/msgraph/generated/models/storage.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .file_storage import FileStorage + +@dataclass +class Storage(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fileStorage property + file_storage: Optional[FileStorage] = None + # The OdataType property + odata_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Storage: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Storage + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Storage() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .file_storage import FileStorage + + from .file_storage import FileStorage + + fields: Dict[str, Callable[[Any], None]] = { + "fileStorage": lambda n : setattr(self, 'file_storage', n.get_object_value(FileStorage)), + "@odata.type": lambda n : setattr(self, 'odata_type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fileStorage", self.file_storage) + writer.write_str_value("@odata.type", self.odata_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/models/user_type.py b/msgraph/generated/models/user_type.py new file mode 100644 index 00000000000..4481a63dc2d --- /dev/null +++ b/msgraph/generated/models/user_type.py @@ -0,0 +1,7 @@ +from enum import Enum + +class UserType(str, Enum): + Member = "member", + Guest = "guest", + UnknownFutureValue = "unknownFutureValue", + diff --git a/msgraph/generated/organization/item/branding/background_image/background_image_request_builder.py b/msgraph/generated/organization/item/branding/background_image/background_image_request_builder.py index 93a819d4f70..09e3f47431c 100644 --- a/msgraph/generated/organization/item/branding/background_image/background_image_request_builder.py +++ b/msgraph/generated/organization/item/branding/background_image/background_image_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None """ @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> bytes: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: bytes """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[QueryPar async def put(self,body: bytes, content_type: str, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> bytes: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param body: Binary request body param content_type: The request body content type. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. @@ -90,7 +90,7 @@ async def put(self,body: bytes, content_type: str, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -101,7 +101,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -112,7 +112,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_put_request_information(self,body: bytes, content_type: str, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param body: Binary request body param content_type: The request body content type. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. diff --git a/msgraph/generated/organization/item/branding/localizations/item/background_image/background_image_request_builder.py b/msgraph/generated/organization/item/branding/localizations/item/background_image/background_image_request_builder.py index 58858e91ef7..80a2c68d4fe 100644 --- a/msgraph/generated/organization/item/branding/localizations/item/background_image/background_image_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/item/background_image/background_image_request_builder.py @@ -30,7 +30,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None """ @@ -48,7 +48,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> bytes: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: bytes """ @@ -66,7 +66,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[QueryPar async def put(self,body: bytes, content_type: str, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> bytes: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param body: Binary request body param content_type: The request body content type. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. @@ -90,7 +90,7 @@ async def put(self,body: bytes, content_type: str, request_configuration: Option def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -101,7 +101,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -112,7 +112,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_put_request_information(self,body: bytes, content_type: str, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image reduces bandwidth requirements and make the page load faster. param body: Binary request body param content_type: The request body content type. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. diff --git a/msgraph/generated/organization/item/branding/localizations/item/banner_logo/banner_logo_request_builder.py b/msgraph/generated/organization/item/branding/localizations/item/banner_logo/banner_logo_request_builder.py index 99445bc4b3c..7d59d396963 100644 --- a/msgraph/generated/organization/item/branding/localizations/item/banner_logo/banner_logo_request_builder.py +++ b/msgraph/generated/organization/item/branding/localizations/item/banner_logo/banner_logo_request_builder.py @@ -48,10 +48,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> bytes: """ - Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error. If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale. This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method. + Read the properties and relationships of an organizationalBrandingLocalization object. To retrieve a localization branding object, specify the value of id in the URL. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: bytes - Find more info here: https://learn.microsoft.com/graph/api/organizationalbranding-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/organizationalbrandinglocalization-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -103,7 +103,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Retrieve the default organizational branding object, if the Accept-Language header is set to 0 or default. If no default organizational branding object exists, this method returns a 404 Not Found error. If the Accept-Language header is set to an existing locale identified by the value of its id, this method retrieves the branding for the specified locale. This method retrieves only non-Stream properties, for example, usernameHintText and signInPageText. To retrieve Stream types of the default branding, for example, bannerLogo and backgroundImage, use the GET organizationalBrandingLocalization method. + Read the properties and relationships of an organizationalBrandingLocalization object. To retrieve a localization branding object, specify the value of id in the URL. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ diff --git a/msgraph/generated/organization/item/organization_item_request_builder.py b/msgraph/generated/organization/item/organization_item_request_builder.py index d0f8e609a0e..5d567f6e3e2 100644 --- a/msgraph/generated/organization/item/organization_item_request_builder.py +++ b/msgraph/generated/organization/item/organization_item_request_builder.py @@ -58,10 +58,10 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[OrganizationItemRequestBuilderGetQueryParameters]] = None) -> Optional[Organization]: """ - Read properties and relationships of the organization object. + Get the properties and relationships of the currently authenticated organization. Since the organization resource supports extensions, you can also use the GET operation to get custom properties and extension data in an organization instance. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[Organization] - Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-organization-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/organization-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -114,7 +114,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[OrganizationItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Read properties and relationships of the organization object. + Get the properties and relationships of the currently authenticated organization. Since the organization resource supports extensions, you can also use the GET operation to get custom properties and extension data in an organization instance. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -239,7 +239,7 @@ class OrganizationItemRequestBuilderDeleteRequestConfiguration(RequestConfigurat @dataclass class OrganizationItemRequestBuilderGetQueryParameters(): """ - Read properties and relationships of the organization object. + Get the properties and relationships of the currently authenticated organization. Since the organization resource supports extensions, you can also use the GET operation to get custom properties and extension data in an organization instance. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/policies/cross_tenant_access_policy/partners/item/identity_synchronization/identity_synchronization_request_builder.py b/msgraph/generated/policies/cross_tenant_access_policy/partners/item/identity_synchronization/identity_synchronization_request_builder.py index a833db3616a..5f12486e672 100644 --- a/msgraph/generated/policies/cross_tenant_access_policy/partners/item/identity_synchronization/identity_synchronization_request_builder.py +++ b/msgraph/generated/policies/cross_tenant_access_policy/partners/item/identity_synchronization/identity_synchronization_request_builder.py @@ -71,11 +71,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Identity async def put(self,body: CrossTenantIdentitySyncPolicyPartner, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CrossTenantIdentitySyncPolicyPartner]: """ - Update the user synchronization policy of a partner-specific configuration. + Create a cross-tenant user synchronization policy for a partner-specific configuration. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[CrossTenantIdentitySyncPolicyPartner] - Find more info here: https://learn.microsoft.com/graph/api/crosstenantidentitysyncpolicypartner-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/crosstenantaccesspolicyconfigurationpartner-put-identitysynchronization?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -117,7 +117,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_put_request_information(self,body: CrossTenantIdentitySyncPolicyPartner, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Update the user synchronization policy of a partner-specific configuration. + Create a cross-tenant user synchronization policy for a partner-specific configuration. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation diff --git a/msgraph/generated/security/microsoft_graph_security_run_hunting_query/microsoft_graph_security_run_hunting_query_request_builder.py b/msgraph/generated/security/microsoft_graph_security_run_hunting_query/microsoft_graph_security_run_hunting_query_request_builder.py index 513df37148d..0fae1fcd63d 100644 --- a/msgraph/generated/security/microsoft_graph_security_run_hunting_query/microsoft_graph_security_run_hunting_query_request_builder.py +++ b/msgraph/generated/security/microsoft_graph_security_run_hunting_query/microsoft_graph_security_run_hunting_query_request_builder.py @@ -32,7 +32,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def post(self,body: RunHuntingQueryPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[HuntingQueryResults]: """ - Queries a specified set of event, activity, or entity data supported by Microsoft 365 Defender to proactively look for specific threats in your environment. This is the method for advanced hunting in Microsoft 365 Defender. This method includes a query in Kusto Query Language (KQL). It specifies a data table in the advanced hunting schema and a piped sequence of operators to filter or search that data, and format the query output in specific ways. Find out more about hunting for threats across devices, emails, apps, and identities. Learn about KQL. For information on using advanced hunting in the Microsoft 365 Defender portal, see Proactively hunt for threats with advanced hunting in Microsoft 365 Defender. + Queries a specified set of event, activity, or entity data supported by Microsoft 365 Defender to proactively look for specific threats in your environment. This method is for advanced hunting in Microsoft 365 Defender. This method includes a query in Kusto Query Language (KQL). It specifies a data table in the advanced hunting schema and a piped sequence of operators to filter or search that data, and format the query output in specific ways. Find out more about hunting for threats across devices, emails, apps, and identities. Learn about KQL. For information on using advanced hunting in the Microsoft 365 Defender portal, see Proactively hunt for threats with advanced hunting in Microsoft 365 Defender. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[HuntingQueryResults] @@ -55,7 +55,7 @@ async def post(self,body: RunHuntingQueryPostRequestBody, request_configuration: def to_post_request_information(self,body: RunHuntingQueryPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Queries a specified set of event, activity, or entity data supported by Microsoft 365 Defender to proactively look for specific threats in your environment. This is the method for advanced hunting in Microsoft 365 Defender. This method includes a query in Kusto Query Language (KQL). It specifies a data table in the advanced hunting schema and a piped sequence of operators to filter or search that data, and format the query output in specific ways. Find out more about hunting for threats across devices, emails, apps, and identities. Learn about KQL. For information on using advanced hunting in the Microsoft 365 Defender portal, see Proactively hunt for threats with advanced hunting in Microsoft 365 Defender. + Queries a specified set of event, activity, or entity data supported by Microsoft 365 Defender to proactively look for specific threats in your environment. This method is for advanced hunting in Microsoft 365 Defender. This method includes a query in Kusto Query Language (KQL). It specifies a data table in the advanced hunting schema and a piped sequence of operators to filter or search that data, and format the query output in specific ways. Find out more about hunting for threats across devices, emails, apps, and identities. Learn about KQL. For information on using advanced hunting in the Microsoft 365 Defender portal, see Proactively hunt for threats with advanced hunting in Microsoft 365 Defender. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation diff --git a/msgraph/generated/sites/sites_request_builder.py b/msgraph/generated/sites/sites_request_builder.py index 6d6e8420c49..797e9ef7602 100644 --- a/msgraph/generated/sites/sites_request_builder.py +++ b/msgraph/generated/sites/sites_request_builder.py @@ -51,10 +51,10 @@ def by_site_id(self,site_id: str) -> SiteItemRequestBuilder: async def get(self,request_configuration: Optional[RequestConfiguration[SitesRequestBuilderGetQueryParameters]] = None) -> Optional[SiteCollectionResponse]: """ - List all available sites in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a $search query against the /sites collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites. For more guidance about building applications that use site discovery for scanning purposes, see Best practices for discovering files and detecting changes at scale. + Search across a SharePoint tenant for sites that match keywords provided. The only property that works for sorting is createdDateTime. The search filter is a free text search that uses multiple properties when retrieving the search results. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SiteCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/site-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/site-search?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -72,7 +72,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[SitesReq def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SitesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - List all available sites in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a $search query against the /sites collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites. For more guidance about building applications that use site discovery for scanning purposes, see Best practices for discovering files and detecting changes at scale. + Search across a SharePoint tenant for sites that match keywords provided. The only property that works for sorting is createdDateTime. The search filter is a free text search that uses multiple properties when retrieving the search results. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -139,7 +139,7 @@ def remove(self) -> RemoveRequestBuilder: @dataclass class SitesRequestBuilderGetQueryParameters(): """ - List all available sites in an organization. Specific filter criteria and query options are also supported and described below: In addition, you can use a $search query against the /sites collection to find sites matching given keywords.If you want to list all sites across all geographies, refer to getAllSites. For more guidance about building applications that use site discovery for scanning purposes, see Best practices for discovering files and detecting changes at scale. + Search across a SharePoint tenant for sites that match keywords provided. The only property that works for sorting is createdDateTime. The search filter is a free text search that uses multiple properties when retrieving the search results. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/storage/file_storage/containers/containers_request_builder.py b/msgraph/generated/storage/file_storage/containers/containers_request_builder.py new file mode 100644 index 00000000000..8414b6a6ad9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/containers_request_builder.py @@ -0,0 +1,209 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ....models.file_storage_container import FileStorageContainer + from ....models.file_storage_container_collection_response import FileStorageContainerCollectionResponse + from ....models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.file_storage_container_item_request_builder import FileStorageContainerItemRequestBuilder + +class ContainersRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containers property of the microsoft.graph.fileStorage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContainersRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_file_storage_container_id(self,file_storage_container_id: str) -> FileStorageContainerItemRequestBuilder: + """ + Provides operations to manage the containers property of the microsoft.graph.fileStorage entity. + param file_storage_container_id: The unique identifier of fileStorageContainer + Returns: FileStorageContainerItemRequestBuilder + """ + if not file_storage_container_id: + raise TypeError("file_storage_container_id cannot be null.") + from .item.file_storage_container_item_request_builder import FileStorageContainerItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["fileStorageContainer%2Did"] = file_storage_container_id + return FileStorageContainerItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContainersRequestBuilderGetQueryParameters]] = None) -> Optional[FileStorageContainerCollectionResponse]: + """ + Retrieve a list of fileStorageContainer objects that are visible to the caller. The containerTypeId filter parameter is required. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FileStorageContainerCollectionResponse] + Find more info here: https://learn.microsoft.com/graph/api/filestorage-list-containers?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ....models.file_storage_container_collection_response import FileStorageContainerCollectionResponse + + return await self.request_adapter.send_async(request_info, FileStorageContainerCollectionResponse, error_mapping) + + async def post(self,body: FileStorageContainer, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[FileStorageContainer]: + """ + Create a new fileStorageContainer object. The respective container type identified by containerTypeId must be enabled in the tenant. For delegated calls, the calling user is set as the owner of the fileStorageContainer. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FileStorageContainer] + Find more info here: https://learn.microsoft.com/graph/api/filestoragecontainer-post?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ....models.file_storage_container import FileStorageContainer + + return await self.request_adapter.send_async(request_info, FileStorageContainer, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContainersRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Retrieve a list of fileStorageContainer objects that are visible to the caller. The containerTypeId filter parameter is required. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: FileStorageContainer, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create a new fileStorageContainer object. The respective container type identified by containerTypeId must be enabled in the tenant. For delegated calls, the calling user is set as the owner of the fileStorageContainer. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ContainersRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContainersRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContainersRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContainersRequestBuilderGetQueryParameters(): + """ + Retrieve a list of fileStorageContainer objects that are visible to the caller. The containerTypeId filter parameter is required. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ContainersRequestBuilderGetRequestConfiguration(RequestConfiguration[ContainersRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContainersRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/count/count_request_builder.py new file mode 100644 index 00000000000..1631007d150 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .....models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/activate/activate_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/activate/activate_request_builder.py new file mode 100644 index 00000000000..93511579081 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/activate/activate_request_builder.py @@ -0,0 +1,77 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ......models.o_data_errors.o_data_error import ODataError + +class ActivateRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the activate method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ActivateRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/activate", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action activate + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action activate + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ActivateRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ActivateRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ActivateRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ActivateRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/bundles/bundles_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/bundles/bundles_request_builder.py new file mode 100644 index 00000000000..49e07f2465d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/bundles/bundles_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.drive_item import DriveItem + from .......models.drive_item_collection_response import DriveItemCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.drive_item_item_request_builder import DriveItemItemRequestBuilder + +class BundlesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the bundles property of the microsoft.graph.drive entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BundlesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/bundles{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_drive_item_id(self,drive_item_id: str) -> DriveItemItemRequestBuilder: + """ + Provides operations to manage the bundles property of the microsoft.graph.drive entity. + param drive_item_id: The unique identifier of driveItem + Returns: DriveItemItemRequestBuilder + """ + if not drive_item_id: + raise TypeError("drive_item_id cannot be null.") + from .item.drive_item_item_request_builder import DriveItemItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["driveItem%2Did"] = drive_item_id + return DriveItemItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[BundlesRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItemCollectionResponse]: + """ + Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.drive_item_collection_response import DriveItemCollectionResponse + + return await self.request_adapter.send_async(request_info, DriveItemCollectionResponse, error_mapping) + + async def post(self,body: DriveItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + Create new navigation property to bundles for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[BundlesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: DriveItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to bundles for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BundlesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BundlesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BundlesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class BundlesRequestBuilderGetQueryParameters(): + """ + Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class BundlesRequestBuilderGetRequestConfiguration(RequestConfiguration[BundlesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class BundlesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/bundles/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/bundles/count/count_request_builder.py new file mode 100644 index 00000000000..b106db5dc9f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/bundles/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/bundles/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/bundles/item/content/content_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/bundles/item/content/content_request_builder.py new file mode 100644 index 00000000000..3181b3006d8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/bundles/item/content/content_request_builder.py @@ -0,0 +1,180 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.drive_item import DriveItem + from .........models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the storage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/bundles/{driveItem%2Did}/content{?%24format*}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> bytes: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/octet-stream, application/json") + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body, "application/octet-stream") + return request_info + + def with_url(self,raw_url: str) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ContentRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderGetQueryParameters(): + """ + The content stream, if the item represents a file. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "format": + return "%24format" + return original_name + + # Format of the content + format: Optional[str] = None + + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/bundles/item/drive_item_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/bundles/item/drive_item_item_request_builder.py new file mode 100644 index 00000000000..79abb4053ff --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/bundles/item/drive_item_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.drive_item import DriveItem + from ........models.o_data_errors.o_data_error import ODataError + from .content.content_request_builder import ContentRequestBuilder + +class DriveItemItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the bundles property of the microsoft.graph.drive entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DriveItemItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/bundles/{driveItem%2Did}{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItem]: + """ + Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DriveItemItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DriveItemItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DriveItemItemRequestBuilder(self.request_adapter, raw_url) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the storage entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DriveItemItemRequestBuilderGetQueryParameters(): + """ + Collection of bundles (albums and multi-select-shared sets of items). Only in personal OneDrive. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DriveItemItemRequestBuilderGetRequestConfiguration(RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/created_by_user_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/created_by_user_request_builder.py new file mode 100644 index 00000000000..5607f71fa5f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/created_by_user_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .......models.user import User + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class CreatedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CreatedByUserRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/createdByUser{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]] = None) -> Optional[User]: + """ + Identity of the user who created the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[User] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.user import User + + return await self.request_adapter.send_async(request_info, User, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Identity of the user who created the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CreatedByUserRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CreatedByUserRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CreatedByUserRequestBuilder(self.request_adapter, raw_url) + + @property + def mailbox_settings(self) -> MailboxSettingsRequestBuilder: + """ + The mailboxSettings property + """ + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + + return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CreatedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who created the item. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class CreatedByUserRequestBuilderGetRequestConfiguration(RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/mailbox_settings/mailbox_settings_request_builder.py new file mode 100644 index 00000000000..0bb231149c7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -0,0 +1,151 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.mailbox_settings import MailboxSettings + from ........models.o_data_errors.o_data_error import ODataError + +class MailboxSettingsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/createdByUser/mailboxSettings + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/createdByUser/mailboxSettings{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + async def patch(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MailboxSettingsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MailboxSettingsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MailboxSettingsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MailboxSettingsRequestBuilderGetQueryParameters(): + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MailboxSettingsRequestBuilderGetRequestConfiguration(RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MailboxSettingsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..c392abc7868 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/createdByUser/serviceProvisioningErrors/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..7da5742c6cc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,146 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/createdByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/drive_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/drive_request_builder.py new file mode 100644 index 00000000000..101c164c4d9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/drive_request_builder.py @@ -0,0 +1,300 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ......models.drive import Drive + from ......models.o_data_errors.o_data_error import ODataError + from .bundles.bundles_request_builder import BundlesRequestBuilder + from .created_by_user.created_by_user_request_builder import CreatedByUserRequestBuilder + from .following.following_request_builder import FollowingRequestBuilder + from .items.items_request_builder import ItemsRequestBuilder + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + from .list_.list_request_builder import ListRequestBuilder + from .recent.recent_request_builder import RecentRequestBuilder + from .root.root_request_builder import RootRequestBuilder + from .search_with_q.search_with_q_request_builder import SearchWithQRequestBuilder + from .shared_with_me.shared_with_me_request_builder import SharedWithMeRequestBuilder + from .special.special_request_builder import SpecialRequestBuilder + +class DriveRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the drive property of the microsoft.graph.fileStorageContainer entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DriveRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property drive for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[DriveRequestBuilderGetQueryParameters]] = None) -> Optional[Drive]: + """ + The drive of the resource fileStorageContainer. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Drive] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.drive import Drive + + return await self.request_adapter.send_async(request_info, Drive, error_mapping) + + async def patch(self,body: Drive, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Drive]: + """ + Update the navigation property drive in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Drive] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.drive import Drive + + return await self.request_adapter.send_async(request_info, Drive, error_mapping) + + def search_with_q(self,q: str) -> SearchWithQRequestBuilder: + """ + Provides operations to call the search method. + param q: Usage: q='{q}' + Returns: SearchWithQRequestBuilder + """ + if not q: + raise TypeError("q cannot be null.") + from .search_with_q.search_with_q_request_builder import SearchWithQRequestBuilder + + return SearchWithQRequestBuilder(self.request_adapter, self.path_parameters, q) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property drive for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DriveRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The drive of the resource fileStorageContainer. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Drive, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property drive in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DriveRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DriveRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DriveRequestBuilder(self.request_adapter, raw_url) + + @property + def bundles(self) -> BundlesRequestBuilder: + """ + Provides operations to manage the bundles property of the microsoft.graph.drive entity. + """ + from .bundles.bundles_request_builder import BundlesRequestBuilder + + return BundlesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def created_by_user(self) -> CreatedByUserRequestBuilder: + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + from .created_by_user.created_by_user_request_builder import CreatedByUserRequestBuilder + + return CreatedByUserRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def following(self) -> FollowingRequestBuilder: + """ + Provides operations to manage the following property of the microsoft.graph.drive entity. + """ + from .following.following_request_builder import FollowingRequestBuilder + + return FollowingRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def items(self) -> ItemsRequestBuilder: + """ + Provides operations to manage the items property of the microsoft.graph.drive entity. + """ + from .items.items_request_builder import ItemsRequestBuilder + + return ItemsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def last_modified_by_user(self) -> LastModifiedByUserRequestBuilder: + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + + return LastModifiedByUserRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def list_(self) -> ListRequestBuilder: + """ + Provides operations to manage the list property of the microsoft.graph.drive entity. + """ + from .list_.list_request_builder import ListRequestBuilder + + return ListRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def recent(self) -> RecentRequestBuilder: + """ + Provides operations to call the recent method. + """ + from .recent.recent_request_builder import RecentRequestBuilder + + return RecentRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def root(self) -> RootRequestBuilder: + """ + Provides operations to manage the root property of the microsoft.graph.drive entity. + """ + from .root.root_request_builder import RootRequestBuilder + + return RootRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def shared_with_me(self) -> SharedWithMeRequestBuilder: + """ + Provides operations to call the sharedWithMe method. + """ + from .shared_with_me.shared_with_me_request_builder import SharedWithMeRequestBuilder + + return SharedWithMeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def special(self) -> SpecialRequestBuilder: + """ + Provides operations to manage the special property of the microsoft.graph.drive entity. + """ + from .special.special_request_builder import SpecialRequestBuilder + + return SpecialRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DriveRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DriveRequestBuilderGetQueryParameters(): + """ + The drive of the resource fileStorageContainer. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DriveRequestBuilderGetRequestConfiguration(RequestConfiguration[DriveRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DriveRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/following/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/following/count/count_request_builder.py new file mode 100644 index 00000000000..3a7e935a958 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/following/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/following/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/following/following_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/following/following_request_builder.py new file mode 100644 index 00000000000..115ea1ec4fb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/following/following_request_builder.py @@ -0,0 +1,161 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.drive_item_collection_response import DriveItemCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.drive_item_item_request_builder import DriveItemItemRequestBuilder + +class FollowingRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the following property of the microsoft.graph.drive entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FollowingRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/following{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_drive_item_id(self,drive_item_id: str) -> DriveItemItemRequestBuilder: + """ + Provides operations to manage the following property of the microsoft.graph.drive entity. + param drive_item_id: The unique identifier of driveItem + Returns: DriveItemItemRequestBuilder + """ + if not drive_item_id: + raise TypeError("drive_item_id cannot be null.") + from .item.drive_item_item_request_builder import DriveItemItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["driveItem%2Did"] = drive_item_id + return DriveItemItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[FollowingRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItemCollectionResponse]: + """ + The list of items the user is following. Only in OneDrive for Business. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.drive_item_collection_response import DriveItemCollectionResponse + + return await self.request_adapter.send_async(request_info, DriveItemCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FollowingRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The list of items the user is following. Only in OneDrive for Business. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> FollowingRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FollowingRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FollowingRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FollowingRequestBuilderGetQueryParameters(): + """ + The list of items the user is following. Only in OneDrive for Business. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class FollowingRequestBuilderGetRequestConfiguration(RequestConfiguration[FollowingRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/following/item/content/content_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/following/item/content/content_request_builder.py new file mode 100644 index 00000000000..c1181d0f065 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/following/item/content/content_request_builder.py @@ -0,0 +1,180 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.drive_item import DriveItem + from .........models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the storage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/following/{driveItem%2Did}/content{?%24format*}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> bytes: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/octet-stream, application/json") + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body, "application/octet-stream") + return request_info + + def with_url(self,raw_url: str) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ContentRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderGetQueryParameters(): + """ + The content stream, if the item represents a file. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "format": + return "%24format" + return original_name + + # Format of the content + format: Optional[str] = None + + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/following/item/drive_item_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/following/item/drive_item_item_request_builder.py new file mode 100644 index 00000000000..0db8ad8e7a3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/following/item/drive_item_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.drive_item import DriveItem + from ........models.o_data_errors.o_data_error import ODataError + from .content.content_request_builder import ContentRequestBuilder + +class DriveItemItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the following property of the microsoft.graph.drive entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DriveItemItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/following/{driveItem%2Did}{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItem]: + """ + The list of items the user is following. Only in OneDrive for Business. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The list of items the user is following. Only in OneDrive for Business. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DriveItemItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DriveItemItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DriveItemItemRequestBuilder(self.request_adapter, raw_url) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the storage entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DriveItemItemRequestBuilderGetQueryParameters(): + """ + The list of items the user is following. Only in OneDrive for Business. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DriveItemItemRequestBuilderGetRequestConfiguration(RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/count/count_request_builder.py new file mode 100644 index 00000000000..e346bdab58d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/all_time/all_time_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/all_time/all_time_request_builder.py new file mode 100644 index 00000000000..6d9e8d9cb81 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/all_time/all_time_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.item_activity_stat import ItemActivityStat + from ..........models.o_data_errors.o_data_error import ODataError + +class AllTimeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the allTime property of the microsoft.graph.itemAnalytics entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AllTimeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics/allTime{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[AllTimeRequestBuilderGetQueryParameters]] = None) -> Optional[ItemActivityStat]: + """ + Get allTime from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemActivityStat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.item_activity_stat import ItemActivityStat + + return await self.request_adapter.send_async(request_info, ItemActivityStat, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AllTimeRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get allTime from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> AllTimeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AllTimeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AllTimeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AllTimeRequestBuilderGetQueryParameters(): + """ + Get allTime from storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class AllTimeRequestBuilderGetRequestConfiguration(RequestConfiguration[AllTimeRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/analytics_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/analytics_request_builder.py new file mode 100644 index 00000000000..39438b5f361 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/analytics_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.item_analytics import ItemAnalytics + from .........models.o_data_errors.o_data_error import ODataError + from .all_time.all_time_request_builder import AllTimeRequestBuilder + from .item_activity_stats.item_activity_stats_request_builder import ItemActivityStatsRequestBuilder + from .last_seven_days.last_seven_days_request_builder import LastSevenDaysRequestBuilder + +class AnalyticsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the analytics property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AnalyticsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property analytics for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[AnalyticsRequestBuilderGetQueryParameters]] = None) -> Optional[ItemAnalytics]: + """ + Analytics about the view activities that took place on this item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemAnalytics] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.item_analytics import ItemAnalytics + + return await self.request_adapter.send_async(request_info, ItemAnalytics, error_mapping) + + async def patch(self,body: ItemAnalytics, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ItemAnalytics]: + """ + Update the navigation property analytics in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemAnalytics] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.item_analytics import ItemAnalytics + + return await self.request_adapter.send_async(request_info, ItemAnalytics, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property analytics for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AnalyticsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Analytics about the view activities that took place on this item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ItemAnalytics, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property analytics in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AnalyticsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AnalyticsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AnalyticsRequestBuilder(self.request_adapter, raw_url) + + @property + def all_time(self) -> AllTimeRequestBuilder: + """ + Provides operations to manage the allTime property of the microsoft.graph.itemAnalytics entity. + """ + from .all_time.all_time_request_builder import AllTimeRequestBuilder + + return AllTimeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def item_activity_stats(self) -> ItemActivityStatsRequestBuilder: + """ + Provides operations to manage the itemActivityStats property of the microsoft.graph.itemAnalytics entity. + """ + from .item_activity_stats.item_activity_stats_request_builder import ItemActivityStatsRequestBuilder + + return ItemActivityStatsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def last_seven_days(self) -> LastSevenDaysRequestBuilder: + """ + Provides operations to manage the lastSevenDays property of the microsoft.graph.itemAnalytics entity. + """ + from .last_seven_days.last_seven_days_request_builder import LastSevenDaysRequestBuilder + + return LastSevenDaysRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AnalyticsRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AnalyticsRequestBuilderGetQueryParameters(): + """ + Analytics about the view activities that took place on this item. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class AnalyticsRequestBuilderGetRequestConfiguration(RequestConfiguration[AnalyticsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AnalyticsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/count/count_request_builder.py new file mode 100644 index 00000000000..61004fb2e03 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics/itemActivityStats/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.py new file mode 100644 index 00000000000..06dc3b141c6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/activities_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.item_activity import ItemActivity + from ............models.item_activity_collection_response import ItemActivityCollectionResponse + from ............models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.item_activity_item_request_builder import ItemActivityItemRequestBuilder + +class ActivitiesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the activities property of the microsoft.graph.itemActivityStat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ActivitiesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_item_activity_id(self,item_activity_id: str) -> ItemActivityItemRequestBuilder: + """ + Provides operations to manage the activities property of the microsoft.graph.itemActivityStat entity. + param item_activity_id: The unique identifier of itemActivity + Returns: ItemActivityItemRequestBuilder + """ + if not item_activity_id: + raise TypeError("item_activity_id cannot be null.") + from .item.item_activity_item_request_builder import ItemActivityItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["itemActivity%2Did"] = item_activity_id + return ItemActivityItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ActivitiesRequestBuilderGetQueryParameters]] = None) -> Optional[ItemActivityCollectionResponse]: + """ + Exposes the itemActivities represented in this itemActivityStat resource. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemActivityCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.item_activity_collection_response import ItemActivityCollectionResponse + + return await self.request_adapter.send_async(request_info, ItemActivityCollectionResponse, error_mapping) + + async def post(self,body: ItemActivity, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ItemActivity]: + """ + Create new navigation property to activities for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemActivity] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.item_activity import ItemActivity + + return await self.request_adapter.send_async(request_info, ItemActivity, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ActivitiesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Exposes the itemActivities represented in this itemActivityStat resource. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ItemActivity, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to activities for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ActivitiesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ActivitiesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ActivitiesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ActivitiesRequestBuilderGetQueryParameters(): + """ + Exposes the itemActivities represented in this itemActivityStat resource. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ActivitiesRequestBuilderGetRequestConfiguration(RequestConfiguration[ActivitiesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ActivitiesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py new file mode 100644 index 00000000000..c7b3c710979 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py new file mode 100644 index 00000000000..c3aa97d35be --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/drive_item/content/content_request_builder.py @@ -0,0 +1,180 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.drive_item import DriveItem + from ...............models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the storage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/{itemActivity%2Did}/driveItem/content{?%24format*}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> bytes: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/octet-stream, application/json") + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body, "application/octet-stream") + return request_info + + def with_url(self,raw_url: str) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ContentRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderGetQueryParameters(): + """ + The content stream, if the item represents a file. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "format": + return "%24format" + return original_name + + # Format of the content + format: Optional[str] = None + + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py new file mode 100644 index 00000000000..2ba70563ba5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/drive_item/drive_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.drive_item import DriveItem + from ..............models.o_data_errors.o_data_error import ODataError + from .content.content_request_builder import ContentRequestBuilder + +class DriveItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the driveItem property of the microsoft.graph.itemActivity entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DriveItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/{itemActivity%2Did}/driveItem{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DriveItemRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItem]: + """ + Exposes the driveItem that was the target of this activity. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DriveItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Exposes the driveItem that was the target of this activity. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DriveItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DriveItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DriveItemRequestBuilder(self.request_adapter, raw_url) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the storage entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DriveItemRequestBuilderGetQueryParameters(): + """ + Exposes the driveItem that was the target of this activity. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DriveItemRequestBuilderGetRequestConfiguration(RequestConfiguration[DriveItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py new file mode 100644 index 00000000000..442610a579e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/activities/item/item_activity_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.item_activity import ItemActivity + from .............models.o_data_errors.o_data_error import ODataError + from .drive_item.drive_item_request_builder import DriveItemRequestBuilder + +class ItemActivityItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the activities property of the microsoft.graph.itemActivityStat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ItemActivityItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}/activities/{itemActivity%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property activities for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ItemActivityItemRequestBuilderGetQueryParameters]] = None) -> Optional[ItemActivity]: + """ + Exposes the itemActivities represented in this itemActivityStat resource. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemActivity] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.item_activity import ItemActivity + + return await self.request_adapter.send_async(request_info, ItemActivity, error_mapping) + + async def patch(self,body: ItemActivity, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ItemActivity]: + """ + Update the navigation property activities in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemActivity] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.item_activity import ItemActivity + + return await self.request_adapter.send_async(request_info, ItemActivity, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property activities for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ItemActivityItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Exposes the itemActivities represented in this itemActivityStat resource. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ItemActivity, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property activities in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ItemActivityItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemActivityItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemActivityItemRequestBuilder(self.request_adapter, raw_url) + + @property + def drive_item(self) -> DriveItemRequestBuilder: + """ + Provides operations to manage the driveItem property of the microsoft.graph.itemActivity entity. + """ + from .drive_item.drive_item_request_builder import DriveItemRequestBuilder + + return DriveItemRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemActivityItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ItemActivityItemRequestBuilderGetQueryParameters(): + """ + Exposes the itemActivities represented in this itemActivityStat resource. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ItemActivityItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ItemActivityItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ItemActivityItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py new file mode 100644 index 00000000000..310918d4ee4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item/item_activity_stat_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.item_activity_stat import ItemActivityStat + from ...........models.o_data_errors.o_data_error import ODataError + from .activities.activities_request_builder import ActivitiesRequestBuilder + +class ItemActivityStatItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the itemActivityStats property of the microsoft.graph.itemAnalytics entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ItemActivityStatItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics/itemActivityStats/{itemActivityStat%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property itemActivityStats for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ItemActivityStatItemRequestBuilderGetQueryParameters]] = None) -> Optional[ItemActivityStat]: + """ + Get itemActivityStats from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemActivityStat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.item_activity_stat import ItemActivityStat + + return await self.request_adapter.send_async(request_info, ItemActivityStat, error_mapping) + + async def patch(self,body: ItemActivityStat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ItemActivityStat]: + """ + Update the navigation property itemActivityStats in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemActivityStat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.item_activity_stat import ItemActivityStat + + return await self.request_adapter.send_async(request_info, ItemActivityStat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property itemActivityStats for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ItemActivityStatItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get itemActivityStats from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ItemActivityStat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property itemActivityStats in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ItemActivityStatItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemActivityStatItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemActivityStatItemRequestBuilder(self.request_adapter, raw_url) + + @property + def activities(self) -> ActivitiesRequestBuilder: + """ + Provides operations to manage the activities property of the microsoft.graph.itemActivityStat entity. + """ + from .activities.activities_request_builder import ActivitiesRequestBuilder + + return ActivitiesRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemActivityStatItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ItemActivityStatItemRequestBuilderGetQueryParameters(): + """ + Get itemActivityStats from storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ItemActivityStatItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ItemActivityStatItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ItemActivityStatItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.py new file mode 100644 index 00000000000..b340b19ac45 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/item_activity_stats/item_activity_stats_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.item_activity_stat import ItemActivityStat + from ..........models.item_activity_stat_collection_response import ItemActivityStatCollectionResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.item_activity_stat_item_request_builder import ItemActivityStatItemRequestBuilder + +class ItemActivityStatsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the itemActivityStats property of the microsoft.graph.itemAnalytics entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ItemActivityStatsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics/itemActivityStats{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_item_activity_stat_id(self,item_activity_stat_id: str) -> ItemActivityStatItemRequestBuilder: + """ + Provides operations to manage the itemActivityStats property of the microsoft.graph.itemAnalytics entity. + param item_activity_stat_id: The unique identifier of itemActivityStat + Returns: ItemActivityStatItemRequestBuilder + """ + if not item_activity_stat_id: + raise TypeError("item_activity_stat_id cannot be null.") + from .item.item_activity_stat_item_request_builder import ItemActivityStatItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["itemActivityStat%2Did"] = item_activity_stat_id + return ItemActivityStatItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ItemActivityStatsRequestBuilderGetQueryParameters]] = None) -> Optional[ItemActivityStatCollectionResponse]: + """ + Get itemActivityStats from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemActivityStatCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.item_activity_stat_collection_response import ItemActivityStatCollectionResponse + + return await self.request_adapter.send_async(request_info, ItemActivityStatCollectionResponse, error_mapping) + + async def post(self,body: ItemActivityStat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ItemActivityStat]: + """ + Create new navigation property to itemActivityStats for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemActivityStat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.item_activity_stat import ItemActivityStat + + return await self.request_adapter.send_async(request_info, ItemActivityStat, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ItemActivityStatsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get itemActivityStats from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ItemActivityStat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to itemActivityStats for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ItemActivityStatsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemActivityStatsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemActivityStatsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemActivityStatsRequestBuilderGetQueryParameters(): + """ + Get itemActivityStats from storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ItemActivityStatsRequestBuilderGetRequestConfiguration(RequestConfiguration[ItemActivityStatsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ItemActivityStatsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/last_seven_days/last_seven_days_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/last_seven_days/last_seven_days_request_builder.py new file mode 100644 index 00000000000..a26708b616b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/analytics/last_seven_days/last_seven_days_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.item_activity_stat import ItemActivityStat + from ..........models.o_data_errors.o_data_error import ODataError + +class LastSevenDaysRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lastSevenDays property of the microsoft.graph.itemAnalytics entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LastSevenDaysRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/analytics/lastSevenDays{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[LastSevenDaysRequestBuilderGetQueryParameters]] = None) -> Optional[ItemActivityStat]: + """ + Get lastSevenDays from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemActivityStat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.item_activity_stat import ItemActivityStat + + return await self.request_adapter.send_async(request_info, ItemActivityStat, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LastSevenDaysRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get lastSevenDays from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> LastSevenDaysRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LastSevenDaysRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LastSevenDaysRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LastSevenDaysRequestBuilderGetQueryParameters(): + """ + Get lastSevenDays from storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LastSevenDaysRequestBuilderGetRequestConfiguration(RequestConfiguration[LastSevenDaysRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/assign_sensitivity_label/assign_sensitivity_label_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/assign_sensitivity_label/assign_sensitivity_label_post_request_body.py new file mode 100644 index 00000000000..6833105437b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/assign_sensitivity_label/assign_sensitivity_label_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.sensitivity_label_assignment_method import SensitivityLabelAssignmentMethod + +@dataclass +class AssignSensitivityLabelPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The assignmentMethod property + assignment_method: Optional[SensitivityLabelAssignmentMethod] = None + # The justificationText property + justification_text: Optional[str] = None + # The sensitivityLabelId property + sensitivity_label_id: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AssignSensitivityLabelPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AssignSensitivityLabelPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AssignSensitivityLabelPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.sensitivity_label_assignment_method import SensitivityLabelAssignmentMethod + + from .........models.sensitivity_label_assignment_method import SensitivityLabelAssignmentMethod + + fields: Dict[str, Callable[[Any], None]] = { + "assignmentMethod": lambda n : setattr(self, 'assignment_method', n.get_enum_value(SensitivityLabelAssignmentMethod)), + "justificationText": lambda n : setattr(self, 'justification_text', n.get_str_value()), + "sensitivityLabelId": lambda n : setattr(self, 'sensitivity_label_id', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_enum_value("assignmentMethod", self.assignment_method) + writer.write_str_value("justificationText", self.justification_text) + writer.write_str_value("sensitivityLabelId", self.sensitivity_label_id) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.py new file mode 100644 index 00000000000..468085c6eff --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/assign_sensitivity_label/assign_sensitivity_label_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .assign_sensitivity_label_post_request_body import AssignSensitivityLabelPostRequestBody + +class AssignSensitivityLabelRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the assignSensitivityLabel method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AssignSensitivityLabelRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/assignSensitivityLabel", path_parameters) + + async def post(self,body: AssignSensitivityLabelPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action assignSensitivityLabel + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: AssignSensitivityLabelPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action assignSensitivityLabel + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AssignSensitivityLabelRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssignSensitivityLabelRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssignSensitivityLabelRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AssignSensitivityLabelRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkin/checkin_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkin/checkin_post_request_body.py new file mode 100644 index 00000000000..3c3355e0a39 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkin/checkin_post_request_body.py @@ -0,0 +1,53 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CheckinPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The checkInAs property + check_in_as: Optional[str] = None + # The comment property + comment: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CheckinPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CheckinPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CheckinPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "checkInAs": lambda n : setattr(self, 'check_in_as', n.get_str_value()), + "comment": lambda n : setattr(self, 'comment', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("checkInAs", self.check_in_as) + writer.write_str_value("comment", self.comment) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkin/checkin_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkin/checkin_request_builder.py new file mode 100644 index 00000000000..702fd932231 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkin/checkin_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .checkin_post_request_body import CheckinPostRequestBody + +class CheckinRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the checkin method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CheckinRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/checkin", path_parameters) + + async def post(self,body: CheckinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Check in a checked out driveItem resource, which makes the version of the document available to others. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/driveitem-checkin?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: CheckinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Check in a checked out driveItem resource, which makes the version of the document available to others. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CheckinRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CheckinRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CheckinRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CheckinRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkout/checkout_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkout/checkout_request_builder.py new file mode 100644 index 00000000000..a2db8f09b33 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/checkout/checkout_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class CheckoutRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the checkout method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CheckoutRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/checkout", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Check out a driveItem resource to prevent others from editing the document, and prevent your changes from being visible until the documented is checked in. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/driveitem-checkout?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Check out a driveItem resource to prevent others from editing the document, and prevent your changes from being visible until the documented is checked in. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CheckoutRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CheckoutRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CheckoutRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CheckoutRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/children_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/children_request_builder.py new file mode 100644 index 00000000000..978caae7396 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/children_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.drive_item import DriveItem + from .........models.drive_item_collection_response import DriveItemCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.drive_item_item_request_builder import DriveItemItemRequestBuilder + +class ChildrenRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the children property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ChildrenRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/children{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_drive_item_id1(self,drive_item_id1: str) -> DriveItemItemRequestBuilder: + """ + Provides operations to manage the children property of the microsoft.graph.driveItem entity. + param drive_item_id1: The unique identifier of driveItem + Returns: DriveItemItemRequestBuilder + """ + if not drive_item_id1: + raise TypeError("drive_item_id1 cannot be null.") + from .item.drive_item_item_request_builder import DriveItemItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["driveItem%2Did1"] = drive_item_id1 + return DriveItemItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ChildrenRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItemCollectionResponse]: + """ + Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item_collection_response import DriveItemCollectionResponse + + return await self.request_adapter.send_async(request_info, DriveItemCollectionResponse, error_mapping) + + async def post(self,body: DriveItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + Create new navigation property to children for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ChildrenRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: DriveItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to children for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ChildrenRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ChildrenRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ChildrenRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ChildrenRequestBuilderGetQueryParameters(): + """ + Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ChildrenRequestBuilderGetRequestConfiguration(RequestConfiguration[ChildrenRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ChildrenRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/count/count_request_builder.py new file mode 100644 index 00000000000..8205ef943f9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/children/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/item/content/content_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/item/content/content_request_builder.py new file mode 100644 index 00000000000..6fa662d6b6b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/item/content/content_request_builder.py @@ -0,0 +1,180 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.drive_item import DriveItem + from ...........models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the storage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/children/{driveItem%2Did1}/content{?%24format*}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> bytes: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/octet-stream, application/json") + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body, "application/octet-stream") + return request_info + + def with_url(self,raw_url: str) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ContentRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderGetQueryParameters(): + """ + The content stream, if the item represents a file. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "format": + return "%24format" + return original_name + + # Format of the content + format: Optional[str] = None + + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/item/drive_item_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/item/drive_item_item_request_builder.py new file mode 100644 index 00000000000..d9f1b62c187 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/children/item/drive_item_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.drive_item import DriveItem + from ..........models.o_data_errors.o_data_error import ODataError + from .content.content_request_builder import ContentRequestBuilder + +class DriveItemItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the children property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DriveItemItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/children/{driveItem%2Did1}{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItem]: + """ + Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DriveItemItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DriveItemItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DriveItemItemRequestBuilder(self.request_adapter, raw_url) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the storage entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DriveItemItemRequestBuilderGetQueryParameters(): + """ + Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DriveItemItemRequestBuilderGetRequestConfiguration(RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/content/content_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/content/content_request_builder.py new file mode 100644 index 00000000000..62053f6e256 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/content/content_request_builder.py @@ -0,0 +1,180 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.drive_item import DriveItem + from .........models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the storage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/content{?%24format*}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> bytes: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/octet-stream, application/json") + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body, "application/octet-stream") + return request_info + + def with_url(self,raw_url: str) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ContentRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderGetQueryParameters(): + """ + The content stream, if the item represents a file. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "format": + return "%24format" + return original_name + + # Format of the content + format: Optional[str] = None + + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/copy/copy_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/copy/copy_post_request_body.py new file mode 100644 index 00000000000..81c45ea94cf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/copy/copy_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.item_reference import ItemReference + +@dataclass +class CopyPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The name property + name: Optional[str] = None + # The parentReference property + parent_reference: Optional[ItemReference] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CopyPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CopyPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CopyPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.item_reference import ItemReference + + from .........models.item_reference import ItemReference + + fields: Dict[str, Callable[[Any], None]] = { + "name": lambda n : setattr(self, 'name', n.get_str_value()), + "parentReference": lambda n : setattr(self, 'parent_reference', n.get_object_value(ItemReference)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("name", self.name) + writer.write_object_value("parentReference", self.parent_reference) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/copy/copy_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/copy/copy_request_builder.py new file mode 100644 index 00000000000..4a7ed3e4022 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/copy/copy_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.drive_item import DriveItem + from .........models.o_data_errors.o_data_error import ODataError + from .copy_post_request_body import CopyPostRequestBody + +class CopyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the copy method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CopyRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/copy", path_parameters) + + async def post(self,body: CopyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + Asynchronously creates a copy of an driveItem (including any children), under a new parent item or with a new name. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + Find more info here: https://learn.microsoft.com/graph/api/driveitem-copy?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_post_request_information(self,body: CopyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Asynchronously creates a copy of an driveItem (including any children), under a new parent item or with a new name. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CopyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CopyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CopyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CopyRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_link/create_link_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_link/create_link_post_request_body.py new file mode 100644 index 00000000000..adae69a35d7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_link/create_link_post_request_body.py @@ -0,0 +1,85 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.drive_recipient import DriveRecipient + +@dataclass +class CreateLinkPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The expirationDateTime property + expiration_date_time: Optional[datetime.datetime] = None + # The message property + message: Optional[str] = None + # The password property + password: Optional[str] = None + # The recipients property + recipients: Optional[List[DriveRecipient]] = None + # The retainInheritedPermissions property + retain_inherited_permissions: Optional[bool] = None + # The scope property + scope: Optional[str] = None + # The sendNotification property + send_notification: Optional[bool] = None + # The type property + type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CreateLinkPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CreateLinkPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CreateLinkPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.drive_recipient import DriveRecipient + + from .........models.drive_recipient import DriveRecipient + + fields: Dict[str, Callable[[Any], None]] = { + "expirationDateTime": lambda n : setattr(self, 'expiration_date_time', n.get_datetime_value()), + "message": lambda n : setattr(self, 'message', n.get_str_value()), + "password": lambda n : setattr(self, 'password', n.get_str_value()), + "recipients": lambda n : setattr(self, 'recipients', n.get_collection_of_object_values(DriveRecipient)), + "retainInheritedPermissions": lambda n : setattr(self, 'retain_inherited_permissions', n.get_bool_value()), + "scope": lambda n : setattr(self, 'scope', n.get_str_value()), + "sendNotification": lambda n : setattr(self, 'send_notification', n.get_bool_value()), + "type": lambda n : setattr(self, 'type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_datetime_value("expirationDateTime", self.expiration_date_time) + writer.write_str_value("message", self.message) + writer.write_str_value("password", self.password) + writer.write_collection_of_object_values("recipients", self.recipients) + writer.write_bool_value("retainInheritedPermissions", self.retain_inherited_permissions) + writer.write_str_value("scope", self.scope) + writer.write_bool_value("sendNotification", self.send_notification) + writer.write_str_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_link/create_link_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_link/create_link_request_builder.py new file mode 100644 index 00000000000..460e61ac3e7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_link/create_link_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.permission import Permission + from .create_link_post_request_body import CreateLinkPostRequestBody + +class CreateLinkRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the createLink method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CreateLinkRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/createLink", path_parameters) + + async def post(self,body: CreateLinkPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Permission]: + """ + You can use createLink action to share a DriveItem via a sharing link. The createLink action will create a new sharing link if the specified link type doesn't already exist for the calling application.If a sharing link of the specified type already exists for the app, the existing sharing link will be returned. DriveItem resources inherit sharing permissions from their ancestors. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Permission] + Find more info here: https://learn.microsoft.com/graph/api/driveitem-createlink?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.permission import Permission + + return await self.request_adapter.send_async(request_info, Permission, error_mapping) + + def to_post_request_information(self,body: CreateLinkPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + You can use createLink action to share a DriveItem via a sharing link. The createLink action will create a new sharing link if the specified link type doesn't already exist for the calling application.If a sharing link of the specified type already exists for the app, the existing sharing link will be returned. DriveItem resources inherit sharing permissions from their ancestors. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CreateLinkRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CreateLinkRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CreateLinkRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CreateLinkRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_upload_session/create_upload_session_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_upload_session/create_upload_session_post_request_body.py new file mode 100644 index 00000000000..a0e302a932a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_upload_session/create_upload_session_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.drive_item_uploadable_properties import DriveItemUploadableProperties + +@dataclass +class CreateUploadSessionPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The item property + item: Optional[DriveItemUploadableProperties] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CreateUploadSessionPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CreateUploadSessionPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CreateUploadSessionPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.drive_item_uploadable_properties import DriveItemUploadableProperties + + from .........models.drive_item_uploadable_properties import DriveItemUploadableProperties + + fields: Dict[str, Callable[[Any], None]] = { + "item": lambda n : setattr(self, 'item', n.get_object_value(DriveItemUploadableProperties)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("item", self.item) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_upload_session/create_upload_session_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_upload_session/create_upload_session_request_builder.py new file mode 100644 index 00000000000..075a1af6b69 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/create_upload_session/create_upload_session_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.upload_session import UploadSession + from .create_upload_session_post_request_body import CreateUploadSessionPostRequestBody + +class CreateUploadSessionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the createUploadSession method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CreateUploadSessionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/createUploadSession", path_parameters) + + async def post(self,body: CreateUploadSessionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[UploadSession]: + """ + Invoke action createUploadSession + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[UploadSession] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.upload_session import UploadSession + + return await self.request_adapter.send_async(request_info, UploadSession, error_mapping) + + def to_post_request_information(self,body: CreateUploadSessionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action createUploadSession + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CreateUploadSessionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CreateUploadSessionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CreateUploadSessionRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CreateUploadSessionRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/created_by_user_request_builder.py new file mode 100644 index 00000000000..01e5a261bc4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/created_by_user_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.user import User + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class CreatedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CreatedByUserRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/createdByUser{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]] = None) -> Optional[User]: + """ + Identity of the user who created the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[User] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.user import User + + return await self.request_adapter.send_async(request_info, User, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Identity of the user who created the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CreatedByUserRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CreatedByUserRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CreatedByUserRequestBuilder(self.request_adapter, raw_url) + + @property + def mailbox_settings(self) -> MailboxSettingsRequestBuilder: + """ + The mailboxSettings property + """ + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + + return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CreatedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who created the item. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class CreatedByUserRequestBuilderGetRequestConfiguration(RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py new file mode 100644 index 00000000000..a7da3e8efa0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -0,0 +1,151 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.mailbox_settings import MailboxSettings + from ..........models.o_data_errors.o_data_error import ODataError + +class MailboxSettingsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/items/{driveItem-id}/createdByUser/mailboxSettings + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/createdByUser/mailboxSettings{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + async def patch(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MailboxSettingsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MailboxSettingsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MailboxSettingsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MailboxSettingsRequestBuilderGetQueryParameters(): + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MailboxSettingsRequestBuilderGetRequestConfiguration(RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MailboxSettingsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..c44618412b5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..71f48312fd6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,146 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/items/{driveItem-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/createdByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta/delta_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta/delta_get_response.py new file mode 100644 index 00000000000..8384239408c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta/delta_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.drive_item import DriveItem + +from .........models.base_delta_function_response import BaseDeltaFunctionResponse + +@dataclass +class DeltaGetResponse(BaseDeltaFunctionResponse): + # The value property + value: Optional[List[DriveItem]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DeltaGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DeltaGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DeltaGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.drive_item import DriveItem + + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.drive_item import DriveItem + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DriveItem)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta/delta_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta/delta_request_builder.py new file mode 100644 index 00000000000..8b8d1247e0e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta/delta_request_builder.py @@ -0,0 +1,137 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .delta_get_response import DeltaGetResponse + +class DeltaRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the delta method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DeltaRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DeltaRequestBuilderGetQueryParameters]] = None) -> Optional[DeltaGetResponse]: + """ + Track changes in a driveItem and its children over time. Your app begins by calling delta without any parameters.The service starts enumerating the drive's hierarchy, returning pages of items and either an @odata.nextLink or an @odata.deltaLink, as described below.Your app should continue calling with the @odata.nextLink until you no longer see an @odata.nextLink returned, or you see a response with an empty set of changes. After you have finished receiving all the changes, you may apply them to your local state.To check for changes in the future, call delta again with the @odata.deltaLink from the previous response. Deleted items are returned with the deleted facet.Items with this property set should be removed from your local state. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DeltaGetResponse] + Find more info here: https://learn.microsoft.com/graph/api/driveitem-delta?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .delta_get_response import DeltaGetResponse + + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeltaRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Track changes in a driveItem and its children over time. Your app begins by calling delta without any parameters.The service starts enumerating the drive's hierarchy, returning pages of items and either an @odata.nextLink or an @odata.deltaLink, as described below.Your app should continue calling with the @odata.nextLink until you no longer see an @odata.nextLink returned, or you see a response with an empty set of changes. After you have finished receiving all the changes, you may apply them to your local state.To check for changes in the future, call delta again with the @odata.deltaLink from the previous response. Deleted items are returned with the deleted facet.Items with this property set should be removed from your local state. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DeltaRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DeltaRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DeltaRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DeltaRequestBuilderGetQueryParameters(): + """ + Track changes in a driveItem and its children over time. Your app begins by calling delta without any parameters.The service starts enumerating the drive's hierarchy, returning pages of items and either an @odata.nextLink or an @odata.deltaLink, as described below.Your app should continue calling with the @odata.nextLink until you no longer see an @odata.nextLink returned, or you see a response with an empty set of changes. After you have finished receiving all the changes, you may apply them to your local state.To check for changes in the future, call delta again with the @odata.deltaLink from the previous response. Deleted items are returned with the deleted facet.Items with this property set should be removed from your local state. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class DeltaRequestBuilderGetRequestConfiguration(RequestConfiguration[DeltaRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta_with_token/delta_with_token_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta_with_token/delta_with_token_get_response.py new file mode 100644 index 00000000000..5bc8d06df5b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta_with_token/delta_with_token_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.drive_item import DriveItem + +from .........models.base_delta_function_response import BaseDeltaFunctionResponse + +@dataclass +class DeltaWithTokenGetResponse(BaseDeltaFunctionResponse): + # The value property + value: Optional[List[DriveItem]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DeltaWithTokenGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DeltaWithTokenGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DeltaWithTokenGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.drive_item import DriveItem + + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.drive_item import DriveItem + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DriveItem)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta_with_token/delta_with_token_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta_with_token/delta_with_token_request_builder.py new file mode 100644 index 00000000000..2f24cbe3d0c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/delta_with_token/delta_with_token_request_builder.py @@ -0,0 +1,139 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .delta_with_token_get_response import DeltaWithTokenGetResponse + +class DeltaWithTokenRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the delta method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], token: Optional[str] = None) -> None: + """ + Instantiates a new DeltaWithTokenRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param token: Usage: token='{token}' + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['token'] = str(token) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/delta(token='{token}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DeltaWithTokenRequestBuilderGetQueryParameters]] = None) -> Optional[DeltaWithTokenGetResponse]: + """ + Invoke function delta + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DeltaWithTokenGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .delta_with_token_get_response import DeltaWithTokenGetResponse + + return await self.request_adapter.send_async(request_info, DeltaWithTokenGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeltaWithTokenRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Invoke function delta + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DeltaWithTokenRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DeltaWithTokenRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DeltaWithTokenRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DeltaWithTokenRequestBuilderGetQueryParameters(): + """ + Invoke function delta + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class DeltaWithTokenRequestBuilderGetRequestConfiguration(RequestConfiguration[DeltaWithTokenRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/drive_item_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/drive_item_item_request_builder.py new file mode 100644 index 00000000000..e708305749b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/drive_item_item_request_builder.py @@ -0,0 +1,512 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.drive_item import DriveItem + from ........models.o_data_errors.o_data_error import ODataError + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + from .assign_sensitivity_label.assign_sensitivity_label_request_builder import AssignSensitivityLabelRequestBuilder + from .checkin.checkin_request_builder import CheckinRequestBuilder + from .checkout.checkout_request_builder import CheckoutRequestBuilder + from .children.children_request_builder import ChildrenRequestBuilder + from .content.content_request_builder import ContentRequestBuilder + from .copy.copy_request_builder import CopyRequestBuilder + from .created_by_user.created_by_user_request_builder import CreatedByUserRequestBuilder + from .create_link.create_link_request_builder import CreateLinkRequestBuilder + from .create_upload_session.create_upload_session_request_builder import CreateUploadSessionRequestBuilder + from .delta.delta_request_builder import DeltaRequestBuilder + from .delta_with_token.delta_with_token_request_builder import DeltaWithTokenRequestBuilder + from .extract_sensitivity_labels.extract_sensitivity_labels_request_builder import ExtractSensitivityLabelsRequestBuilder + from .follow.follow_request_builder import FollowRequestBuilder + from .get_activities_by_interval.get_activities_by_interval_request_builder import GetActivitiesByIntervalRequestBuilder + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval.get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder + from .invite.invite_request_builder import InviteRequestBuilder + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + from .list_item.list_item_request_builder import ListItemRequestBuilder + from .permanent_delete.permanent_delete_request_builder import PermanentDeleteRequestBuilder + from .permissions.permissions_request_builder import PermissionsRequestBuilder + from .preview.preview_request_builder import PreviewRequestBuilder + from .restore.restore_request_builder import RestoreRequestBuilder + from .retention_label.retention_label_request_builder import RetentionLabelRequestBuilder + from .search_with_q.search_with_q_request_builder import SearchWithQRequestBuilder + from .subscriptions.subscriptions_request_builder import SubscriptionsRequestBuilder + from .thumbnails.thumbnails_request_builder import ThumbnailsRequestBuilder + from .unfollow.unfollow_request_builder import UnfollowRequestBuilder + from .validate_permission.validate_permission_request_builder import ValidatePermissionRequestBuilder + from .versions.versions_request_builder import VersionsRequestBuilder + from .workbook.workbook_request_builder import WorkbookRequestBuilder + +class DriveItemItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the items property of the microsoft.graph.drive entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DriveItemItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property items for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def delta_with_token(self,token: str) -> DeltaWithTokenRequestBuilder: + """ + Provides operations to call the delta method. + param token: Usage: token='{token}' + Returns: DeltaWithTokenRequestBuilder + """ + if not token: + raise TypeError("token cannot be null.") + from .delta_with_token.delta_with_token_request_builder import DeltaWithTokenRequestBuilder + + return DeltaWithTokenRequestBuilder(self.request_adapter, self.path_parameters, token) + + async def get(self,request_configuration: Optional[RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItem]: + """ + All items contained in the drive. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval(self,end_date_time: str, interval: str, start_date_time: str) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder: + """ + Provides operations to call the getActivitiesByInterval method. + param end_date_time: Usage: endDateTime='{endDateTime}' + param interval: Usage: interval='{interval}' + param start_date_time: Usage: startDateTime='{startDateTime}' + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder + """ + if not end_date_time: + raise TypeError("end_date_time cannot be null.") + if not interval: + raise TypeError("interval cannot be null.") + if not start_date_time: + raise TypeError("start_date_time cannot be null.") + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval.get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder + + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(self.request_adapter, self.path_parameters, end_date_time, interval, start_date_time) + + async def patch(self,body: DriveItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + Update the navigation property items in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def search_with_q(self,q: str) -> SearchWithQRequestBuilder: + """ + Provides operations to call the search method. + param q: Usage: q='{q}' + Returns: SearchWithQRequestBuilder + """ + if not q: + raise TypeError("q cannot be null.") + from .search_with_q.search_with_q_request_builder import SearchWithQRequestBuilder + + return SearchWithQRequestBuilder(self.request_adapter, self.path_parameters, q) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property items for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + All items contained in the drive. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: DriveItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property items in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DriveItemItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DriveItemItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DriveItemItemRequestBuilder(self.request_adapter, raw_url) + + @property + def analytics(self) -> AnalyticsRequestBuilder: + """ + Provides operations to manage the analytics property of the microsoft.graph.driveItem entity. + """ + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + + return AnalyticsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def assign_sensitivity_label(self) -> AssignSensitivityLabelRequestBuilder: + """ + Provides operations to call the assignSensitivityLabel method. + """ + from .assign_sensitivity_label.assign_sensitivity_label_request_builder import AssignSensitivityLabelRequestBuilder + + return AssignSensitivityLabelRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def checkin(self) -> CheckinRequestBuilder: + """ + Provides operations to call the checkin method. + """ + from .checkin.checkin_request_builder import CheckinRequestBuilder + + return CheckinRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def checkout(self) -> CheckoutRequestBuilder: + """ + Provides operations to call the checkout method. + """ + from .checkout.checkout_request_builder import CheckoutRequestBuilder + + return CheckoutRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def children(self) -> ChildrenRequestBuilder: + """ + Provides operations to manage the children property of the microsoft.graph.driveItem entity. + """ + from .children.children_request_builder import ChildrenRequestBuilder + + return ChildrenRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the storage entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def copy(self) -> CopyRequestBuilder: + """ + Provides operations to call the copy method. + """ + from .copy.copy_request_builder import CopyRequestBuilder + + return CopyRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def create_link(self) -> CreateLinkRequestBuilder: + """ + Provides operations to call the createLink method. + """ + from .create_link.create_link_request_builder import CreateLinkRequestBuilder + + return CreateLinkRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def create_upload_session(self) -> CreateUploadSessionRequestBuilder: + """ + Provides operations to call the createUploadSession method. + """ + from .create_upload_session.create_upload_session_request_builder import CreateUploadSessionRequestBuilder + + return CreateUploadSessionRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def created_by_user(self) -> CreatedByUserRequestBuilder: + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + from .created_by_user.created_by_user_request_builder import CreatedByUserRequestBuilder + + return CreatedByUserRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def delta(self) -> DeltaRequestBuilder: + """ + Provides operations to call the delta method. + """ + from .delta.delta_request_builder import DeltaRequestBuilder + + return DeltaRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def extract_sensitivity_labels(self) -> ExtractSensitivityLabelsRequestBuilder: + """ + Provides operations to call the extractSensitivityLabels method. + """ + from .extract_sensitivity_labels.extract_sensitivity_labels_request_builder import ExtractSensitivityLabelsRequestBuilder + + return ExtractSensitivityLabelsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def follow(self) -> FollowRequestBuilder: + """ + Provides operations to call the follow method. + """ + from .follow.follow_request_builder import FollowRequestBuilder + + return FollowRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def get_activities_by_interval(self) -> GetActivitiesByIntervalRequestBuilder: + """ + Provides operations to call the getActivitiesByInterval method. + """ + from .get_activities_by_interval.get_activities_by_interval_request_builder import GetActivitiesByIntervalRequestBuilder + + return GetActivitiesByIntervalRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def invite(self) -> InviteRequestBuilder: + """ + Provides operations to call the invite method. + """ + from .invite.invite_request_builder import InviteRequestBuilder + + return InviteRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def last_modified_by_user(self) -> LastModifiedByUserRequestBuilder: + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + + return LastModifiedByUserRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def list_item(self) -> ListItemRequestBuilder: + """ + Provides operations to manage the listItem property of the microsoft.graph.driveItem entity. + """ + from .list_item.list_item_request_builder import ListItemRequestBuilder + + return ListItemRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def permanent_delete(self) -> PermanentDeleteRequestBuilder: + """ + Provides operations to call the permanentDelete method. + """ + from .permanent_delete.permanent_delete_request_builder import PermanentDeleteRequestBuilder + + return PermanentDeleteRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def permissions(self) -> PermissionsRequestBuilder: + """ + Provides operations to manage the permissions property of the microsoft.graph.driveItem entity. + """ + from .permissions.permissions_request_builder import PermissionsRequestBuilder + + return PermissionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def preview(self) -> PreviewRequestBuilder: + """ + Provides operations to call the preview method. + """ + from .preview.preview_request_builder import PreviewRequestBuilder + + return PreviewRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def restore(self) -> RestoreRequestBuilder: + """ + Provides operations to call the restore method. + """ + from .restore.restore_request_builder import RestoreRequestBuilder + + return RestoreRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def retention_label(self) -> RetentionLabelRequestBuilder: + """ + Provides operations to manage the retentionLabel property of the microsoft.graph.driveItem entity. + """ + from .retention_label.retention_label_request_builder import RetentionLabelRequestBuilder + + return RetentionLabelRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def subscriptions(self) -> SubscriptionsRequestBuilder: + """ + Provides operations to manage the subscriptions property of the microsoft.graph.driveItem entity. + """ + from .subscriptions.subscriptions_request_builder import SubscriptionsRequestBuilder + + return SubscriptionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def thumbnails(self) -> ThumbnailsRequestBuilder: + """ + Provides operations to manage the thumbnails property of the microsoft.graph.driveItem entity. + """ + from .thumbnails.thumbnails_request_builder import ThumbnailsRequestBuilder + + return ThumbnailsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def unfollow(self) -> UnfollowRequestBuilder: + """ + Provides operations to call the unfollow method. + """ + from .unfollow.unfollow_request_builder import UnfollowRequestBuilder + + return UnfollowRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def validate_permission(self) -> ValidatePermissionRequestBuilder: + """ + Provides operations to call the validatePermission method. + """ + from .validate_permission.validate_permission_request_builder import ValidatePermissionRequestBuilder + + return ValidatePermissionRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def versions(self) -> VersionsRequestBuilder: + """ + Provides operations to manage the versions property of the microsoft.graph.driveItem entity. + """ + from .versions.versions_request_builder import VersionsRequestBuilder + + return VersionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def workbook(self) -> WorkbookRequestBuilder: + """ + Provides operations to manage the workbook property of the microsoft.graph.driveItem entity. + """ + from .workbook.workbook_request_builder import WorkbookRequestBuilder + + return WorkbookRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DriveItemItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DriveItemItemRequestBuilderGetQueryParameters(): + """ + All items contained in the drive. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DriveItemItemRequestBuilderGetRequestConfiguration(RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DriveItemItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.py new file mode 100644 index 00000000000..1463456719f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/extract_sensitivity_labels/extract_sensitivity_labels_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.extract_sensitivity_labels_result import ExtractSensitivityLabelsResult + from .........models.o_data_errors.o_data_error import ODataError + +class ExtractSensitivityLabelsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the extractSensitivityLabels method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ExtractSensitivityLabelsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/extractSensitivityLabels", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ExtractSensitivityLabelsResult]: + """ + Invoke action extractSensitivityLabels + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ExtractSensitivityLabelsResult] + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.extract_sensitivity_labels_result import ExtractSensitivityLabelsResult + + return await self.request_adapter.send_async(request_info, ExtractSensitivityLabelsResult, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action extractSensitivityLabels + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ExtractSensitivityLabelsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ExtractSensitivityLabelsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ExtractSensitivityLabelsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ExtractSensitivityLabelsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/follow/follow_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/follow/follow_request_builder.py new file mode 100644 index 00000000000..4917684ead7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/follow/follow_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.drive_item import DriveItem + from .........models.o_data_errors.o_data_error import ODataError + +class FollowRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the follow method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FollowRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/follow", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + Follow a driveItem. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + Find more info here: https://learn.microsoft.com/graph/api/driveitem-follow?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Follow a driveItem. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> FollowRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FollowRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FollowRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FollowRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py new file mode 100644 index 00000000000..f8d70f673a1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.item_activity_stat import ItemActivityStat + +from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetActivitiesByIntervalGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ItemActivityStat]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GetActivitiesByIntervalGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetActivitiesByIntervalGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetActivitiesByIntervalGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.item_activity_stat import ItemActivityStat + + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.item_activity_stat import ItemActivityStat + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ItemActivityStat)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py new file mode 100644 index 00000000000..a143d382966 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -0,0 +1,137 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse + +class GetActivitiesByIntervalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the getActivitiesByInterval method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GetActivitiesByIntervalRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/getActivitiesByInterval(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[GetActivitiesByIntervalRequestBuilderGetQueryParameters]] = None) -> Optional[GetActivitiesByIntervalGetResponse]: + """ + Get a collection of itemActivityStats resources for the activities that took place on this resource within the specified time interval. Analytics aggregates might not be available for all action types. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[GetActivitiesByIntervalGetResponse] + Find more info here: https://learn.microsoft.com/graph/api/itemactivitystat-getactivitybyinterval?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse + + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GetActivitiesByIntervalRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get a collection of itemActivityStats resources for the activities that took place on this resource within the specified time interval. Analytics aggregates might not be available for all action types. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> GetActivitiesByIntervalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GetActivitiesByIntervalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GetActivitiesByIntervalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GetActivitiesByIntervalRequestBuilderGetQueryParameters(): + """ + Get a collection of itemActivityStats resources for the activities that took place on this resource within the specified time interval. Analytics aggregates might not be available for all action types. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class GetActivitiesByIntervalRequestBuilderGetRequestConfiguration(RequestConfiguration[GetActivitiesByIntervalRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py new file mode 100644 index 00000000000..484ba3dfb17 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.item_activity_stat import ItemActivityStat + +from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ItemActivityStat]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.item_activity_stat import ItemActivityStat + + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.item_activity_stat import ItemActivityStat + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ItemActivityStat)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py new file mode 100644 index 00000000000..d43250e36d3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py @@ -0,0 +1,143 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse + +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the getActivitiesByInterval method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], end_date_time: Optional[str] = None, interval: Optional[str] = None, start_date_time: Optional[str] = None) -> None: + """ + Instantiates a new GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder and sets the default values. + param end_date_time: Usage: endDateTime='{endDateTime}' + param interval: Usage: interval='{interval}' + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param start_date_time: Usage: startDateTime='{startDateTime}' + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['endDateTime'] = str(end_date_time) + path_parameters['interval'] = str(interval) + path_parameters['startDateTime'] = str(start_date_time) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/getActivitiesByInterval(startDateTime='{startDateTime}',endDateTime='{endDateTime}',interval='{interval}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters]] = None) -> Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse]: + """ + Invoke function getActivitiesByInterval + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse + + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Invoke function getActivitiesByInterval + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters(): + """ + Invoke function getActivitiesByInterval + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration(RequestConfiguration[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_post_request_body.py new file mode 100644 index 00000000000..8ba11fc2e6d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_post_request_body.py @@ -0,0 +1,84 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.drive_recipient import DriveRecipient + +@dataclass +class InvitePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The expirationDateTime property + expiration_date_time: Optional[str] = None + # The message property + message: Optional[str] = None + # The password property + password: Optional[str] = None + # The recipients property + recipients: Optional[List[DriveRecipient]] = None + # The requireSignIn property + require_sign_in: Optional[bool] = None + # The retainInheritedPermissions property + retain_inherited_permissions: Optional[bool] = None + # The roles property + roles: Optional[List[str]] = None + # The sendInvitation property + send_invitation: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> InvitePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: InvitePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return InvitePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.drive_recipient import DriveRecipient + + from .........models.drive_recipient import DriveRecipient + + fields: Dict[str, Callable[[Any], None]] = { + "expirationDateTime": lambda n : setattr(self, 'expiration_date_time', n.get_str_value()), + "message": lambda n : setattr(self, 'message', n.get_str_value()), + "password": lambda n : setattr(self, 'password', n.get_str_value()), + "recipients": lambda n : setattr(self, 'recipients', n.get_collection_of_object_values(DriveRecipient)), + "requireSignIn": lambda n : setattr(self, 'require_sign_in', n.get_bool_value()), + "retainInheritedPermissions": lambda n : setattr(self, 'retain_inherited_permissions', n.get_bool_value()), + "roles": lambda n : setattr(self, 'roles', n.get_collection_of_primitive_values(str)), + "sendInvitation": lambda n : setattr(self, 'send_invitation', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("expirationDateTime", self.expiration_date_time) + writer.write_str_value("message", self.message) + writer.write_str_value("password", self.password) + writer.write_collection_of_object_values("recipients", self.recipients) + writer.write_bool_value("requireSignIn", self.require_sign_in) + writer.write_bool_value("retainInheritedPermissions", self.retain_inherited_permissions) + writer.write_collection_of_primitive_values("roles", self.roles) + writer.write_bool_value("sendInvitation", self.send_invitation) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_post_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_post_response.py new file mode 100644 index 00000000000..56bde4a93a4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.permission import Permission + +from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class InvitePostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[Permission]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> InvitePostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: InvitePostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return InvitePostResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.permission import Permission + + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.permission import Permission + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Permission)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_request_builder.py new file mode 100644 index 00000000000..ed69db02685 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/invite/invite_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .invite_post_request_body import InvitePostRequestBody + from .invite_post_response import InvitePostResponse + +class InviteRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the invite method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new InviteRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/invite", path_parameters) + + async def post(self,body: InvitePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[InvitePostResponse]: + """ + Sends a sharing invitation for a driveItem.A sharing invitation provides permissions to the recipients and optionally sends them an email with a sharing link. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[InvitePostResponse] + Find more info here: https://learn.microsoft.com/graph/api/driveitem-invite?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .invite_post_response import InvitePostResponse + + return await self.request_adapter.send_async(request_info, InvitePostResponse, error_mapping) + + def to_post_request_information(self,body: InvitePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Sends a sharing invitation for a driveItem.A sharing invitation provides permissions to the recipients and optionally sends them an email with a sharing link. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> InviteRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: InviteRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return InviteRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class InviteRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/last_modified_by_user_request_builder.py new file mode 100644 index 00000000000..7d2ac1ea461 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.user import User + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class LastModifiedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/lastModifiedByUser{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]] = None) -> Optional[User]: + """ + Identity of the user who last modified the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[User] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.user import User + + return await self.request_adapter.send_async(request_info, User, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Identity of the user who last modified the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> LastModifiedByUserRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LastModifiedByUserRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LastModifiedByUserRequestBuilder(self.request_adapter, raw_url) + + @property + def mailbox_settings(self) -> MailboxSettingsRequestBuilder: + """ + The mailboxSettings property + """ + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + + return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LastModifiedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who last modified the item. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LastModifiedByUserRequestBuilderGetRequestConfiguration(RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py new file mode 100644 index 00000000000..3040444d9b5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -0,0 +1,151 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.mailbox_settings import MailboxSettings + from ..........models.o_data_errors.o_data_error import ODataError + +class MailboxSettingsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/items/{driveItem-id}/lastModifiedByUser/mailboxSettings + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/lastModifiedByUser/mailboxSettings{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + async def patch(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MailboxSettingsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MailboxSettingsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MailboxSettingsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MailboxSettingsRequestBuilderGetQueryParameters(): + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MailboxSettingsRequestBuilderGetRequestConfiguration(RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MailboxSettingsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..cfdccf32298 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..b1c5e76a3e9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,146 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/items/{driveItem-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/list_item/list_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/list_item/list_item_request_builder.py new file mode 100644 index 00000000000..13792c823e0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/list_item/list_item_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.list_item import ListItem + from .........models.o_data_errors.o_data_error import ODataError + +class ListItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the listItem property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ListItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/listItem{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ListItemRequestBuilderGetQueryParameters]] = None) -> Optional[ListItem]: + """ + For drives in SharePoint, the associated document library list item. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.list_item import ListItem + + return await self.request_adapter.send_async(request_info, ListItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ListItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + For drives in SharePoint, the associated document library list item. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ListItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ListItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ListItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ListItemRequestBuilderGetQueryParameters(): + """ + For drives in SharePoint, the associated document library list item. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ListItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ListItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permanent_delete/permanent_delete_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permanent_delete/permanent_delete_request_builder.py new file mode 100644 index 00000000000..70597e89e54 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permanent_delete/permanent_delete_request_builder.py @@ -0,0 +1,77 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class PermanentDeleteRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the permanentDelete method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PermanentDeleteRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/permanentDelete", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action permanentDelete + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action permanentDelete + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> PermanentDeleteRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PermanentDeleteRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PermanentDeleteRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PermanentDeleteRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/count/count_request_builder.py new file mode 100644 index 00000000000..443ab8fbb16 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/permissions/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_post_request_body.py new file mode 100644 index 00000000000..490cb7883a8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.drive_recipient import DriveRecipient + +@dataclass +class GrantPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The recipients property + recipients: Optional[List[DriveRecipient]] = None + # The roles property + roles: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GrantPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GrantPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GrantPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.drive_recipient import DriveRecipient + + from ...........models.drive_recipient import DriveRecipient + + fields: Dict[str, Callable[[Any], None]] = { + "recipients": lambda n : setattr(self, 'recipients', n.get_collection_of_object_values(DriveRecipient)), + "roles": lambda n : setattr(self, 'roles', n.get_collection_of_primitive_values(str)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_collection_of_object_values("recipients", self.recipients) + writer.write_collection_of_primitive_values("roles", self.roles) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_post_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_post_response.py new file mode 100644 index 00000000000..147b91f6bbd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...........models.permission import Permission + +from ...........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GrantPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[Permission]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GrantPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GrantPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GrantPostResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...........models.permission import Permission + + from ...........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ...........models.permission import Permission + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Permission)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_request_builder.py new file mode 100644 index 00000000000..36f135d7b35 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/grant/grant_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from .grant_post_request_body import GrantPostRequestBody + from .grant_post_response import GrantPostResponse + +class GrantRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the grant method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GrantRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/permissions/{permission%2Did}/grant", path_parameters) + + async def post(self,body: GrantPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[GrantPostResponse]: + """ + Grant users access to a link represented by a permission. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[GrantPostResponse] + Find more info here: https://learn.microsoft.com/graph/api/permission-grant?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .grant_post_response import GrantPostResponse + + return await self.request_adapter.send_async(request_info, GrantPostResponse, error_mapping) + + def to_post_request_information(self,body: GrantPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Grant users access to a link represented by a permission. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> GrantRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GrantRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GrantRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GrantRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/permission_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/permission_item_request_builder.py new file mode 100644 index 00000000000..27cb8e7a9a1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/item/permission_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.permission import Permission + from .grant.grant_request_builder import GrantRequestBuilder + +class PermissionItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the permissions property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PermissionItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/permissions/{permission%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property permissions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[PermissionItemRequestBuilderGetQueryParameters]] = None) -> Optional[Permission]: + """ + The set of permissions for the item. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Permission] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.permission import Permission + + return await self.request_adapter.send_async(request_info, Permission, error_mapping) + + async def patch(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Permission]: + """ + Update the navigation property permissions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Permission] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.permission import Permission + + return await self.request_adapter.send_async(request_info, Permission, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property permissions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PermissionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The set of permissions for the item. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property permissions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PermissionItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PermissionItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PermissionItemRequestBuilder(self.request_adapter, raw_url) + + @property + def grant(self) -> GrantRequestBuilder: + """ + Provides operations to call the grant method. + """ + from .grant.grant_request_builder import GrantRequestBuilder + + return GrantRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class PermissionItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class PermissionItemRequestBuilderGetQueryParameters(): + """ + The set of permissions for the item. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class PermissionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[PermissionItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class PermissionItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/permissions_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/permissions_request_builder.py new file mode 100644 index 00000000000..0d8ba68b5b9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/permissions/permissions_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.permission import Permission + from .........models.permission_collection_response import PermissionCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.permission_item_request_builder import PermissionItemRequestBuilder + +class PermissionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the permissions property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PermissionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/permissions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_permission_id(self,permission_id: str) -> PermissionItemRequestBuilder: + """ + Provides operations to manage the permissions property of the microsoft.graph.driveItem entity. + param permission_id: The unique identifier of permission + Returns: PermissionItemRequestBuilder + """ + if not permission_id: + raise TypeError("permission_id cannot be null.") + from .item.permission_item_request_builder import PermissionItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["permission%2Did"] = permission_id + return PermissionItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[PermissionsRequestBuilderGetQueryParameters]] = None) -> Optional[PermissionCollectionResponse]: + """ + The set of permissions for the item. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PermissionCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.permission_collection_response import PermissionCollectionResponse + + return await self.request_adapter.send_async(request_info, PermissionCollectionResponse, error_mapping) + + async def post(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Permission]: + """ + Create new navigation property to permissions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Permission] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.permission import Permission + + return await self.request_adapter.send_async(request_info, Permission, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PermissionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The set of permissions for the item. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to permissions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PermissionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PermissionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PermissionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class PermissionsRequestBuilderGetQueryParameters(): + """ + The set of permissions for the item. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class PermissionsRequestBuilderGetRequestConfiguration(RequestConfiguration[PermissionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class PermissionsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/preview/preview_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/preview/preview_post_request_body.py new file mode 100644 index 00000000000..653f58104c0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/preview/preview_post_request_body.py @@ -0,0 +1,53 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class PreviewPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The page property + page: Optional[str] = None + # The zoom property + zoom: Optional[float] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PreviewPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PreviewPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PreviewPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "page": lambda n : setattr(self, 'page', n.get_str_value()), + "zoom": lambda n : setattr(self, 'zoom', n.get_float_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("page", self.page) + writer.write_float_value("zoom", self.zoom) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/preview/preview_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/preview/preview_request_builder.py new file mode 100644 index 00000000000..cd472539deb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/preview/preview_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.item_preview_info import ItemPreviewInfo + from .........models.o_data_errors.o_data_error import ODataError + from .preview_post_request_body import PreviewPostRequestBody + +class PreviewRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the preview method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PreviewRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/preview", path_parameters) + + async def post(self,body: PreviewPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ItemPreviewInfo]: + """ + Invoke action preview + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemPreviewInfo] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.item_preview_info import ItemPreviewInfo + + return await self.request_adapter.send_async(request_info, ItemPreviewInfo, error_mapping) + + def to_post_request_information(self,body: PreviewPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action preview + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PreviewRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PreviewRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PreviewRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PreviewRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/restore/restore_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/restore/restore_post_request_body.py new file mode 100644 index 00000000000..6f6c82b0738 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/restore/restore_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.item_reference import ItemReference + +@dataclass +class RestorePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The name property + name: Optional[str] = None + # The parentReference property + parent_reference: Optional[ItemReference] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RestorePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RestorePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RestorePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.item_reference import ItemReference + + from .........models.item_reference import ItemReference + + fields: Dict[str, Callable[[Any], None]] = { + "name": lambda n : setattr(self, 'name', n.get_str_value()), + "parentReference": lambda n : setattr(self, 'parent_reference', n.get_object_value(ItemReference)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("name", self.name) + writer.write_object_value("parentReference", self.parent_reference) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/restore/restore_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/restore/restore_request_builder.py new file mode 100644 index 00000000000..878ce5efd73 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/restore/restore_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.drive_item import DriveItem + from .........models.o_data_errors.o_data_error import ODataError + from .restore_post_request_body import RestorePostRequestBody + +class RestoreRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the restore method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RestoreRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/restore", path_parameters) + + async def post(self,body: RestorePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + Restore a driveItem that has been deleted and is currently in the recycle bin. NOTE: This functionality is currently only available for OneDrive Personal. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + Find more info here: https://learn.microsoft.com/graph/api/driveitem-restore?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_post_request_information(self,body: RestorePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Restore a driveItem that has been deleted and is currently in the recycle bin. NOTE: This functionality is currently only available for OneDrive Personal. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RestoreRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RestoreRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RestoreRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RestoreRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/retention_label/retention_label_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/retention_label/retention_label_request_builder.py new file mode 100644 index 00000000000..c3c2c3b90c1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/retention_label/retention_label_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.item_retention_label import ItemRetentionLabel + from .........models.o_data_errors.o_data_error import ODataError + +class RetentionLabelRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the retentionLabel property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RetentionLabelRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/retentionLabel{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property retentionLabel for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[RetentionLabelRequestBuilderGetQueryParameters]] = None) -> Optional[ItemRetentionLabel]: + """ + Information about retention label and settings enforced on the driveItem. Read-write. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemRetentionLabel] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.item_retention_label import ItemRetentionLabel + + return await self.request_adapter.send_async(request_info, ItemRetentionLabel, error_mapping) + + async def patch(self,body: ItemRetentionLabel, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ItemRetentionLabel]: + """ + Update the navigation property retentionLabel in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemRetentionLabel] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.item_retention_label import ItemRetentionLabel + + return await self.request_adapter.send_async(request_info, ItemRetentionLabel, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property retentionLabel for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RetentionLabelRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Information about retention label and settings enforced on the driveItem. Read-write. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ItemRetentionLabel, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property retentionLabel in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RetentionLabelRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RetentionLabelRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RetentionLabelRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RetentionLabelRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RetentionLabelRequestBuilderGetQueryParameters(): + """ + Information about retention label and settings enforced on the driveItem. Read-write. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class RetentionLabelRequestBuilderGetRequestConfiguration(RequestConfiguration[RetentionLabelRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RetentionLabelRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/search_with_q/search_with_q_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/search_with_q/search_with_q_get_response.py new file mode 100644 index 00000000000..d91062b3f27 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/search_with_q/search_with_q_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.drive_item import DriveItem + +from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class SearchWithQGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DriveItem]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SearchWithQGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SearchWithQGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SearchWithQGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.drive_item import DriveItem + + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.drive_item import DriveItem + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DriveItem)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/search_with_q/search_with_q_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/search_with_q/search_with_q_request_builder.py new file mode 100644 index 00000000000..6976b4cb349 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/search_with_q/search_with_q_request_builder.py @@ -0,0 +1,140 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .search_with_q_get_response import SearchWithQGetResponse + +class SearchWithQRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the search method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], q: Optional[str] = None) -> None: + """ + Instantiates a new SearchWithQRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param q: Usage: q='{q}' + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['q'] = str(q) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/search(q='{q}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[SearchWithQRequestBuilderGetQueryParameters]] = None) -> Optional[SearchWithQGetResponse]: + """ + Search the hierarchy of items for items matching a query.You can search within a folder hierarchy, a whole drive, or files shared with the current user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SearchWithQGetResponse] + Find more info here: https://learn.microsoft.com/graph/api/driveitem-search?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .search_with_q_get_response import SearchWithQGetResponse + + return await self.request_adapter.send_async(request_info, SearchWithQGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SearchWithQRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Search the hierarchy of items for items matching a query.You can search within a folder hierarchy, a whole drive, or files shared with the current user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> SearchWithQRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SearchWithQRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SearchWithQRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SearchWithQRequestBuilderGetQueryParameters(): + """ + Search the hierarchy of items for items matching a query.You can search within a folder hierarchy, a whole drive, or files shared with the current user. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class SearchWithQRequestBuilderGetRequestConfiguration(RequestConfiguration[SearchWithQRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/count/count_request_builder.py new file mode 100644 index 00000000000..364f7198289 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/subscriptions/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.py new file mode 100644 index 00000000000..13f9ab77d3a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/item/reauthorize/reauthorize_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class ReauthorizeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the reauthorize method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReauthorizeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/subscriptions/{subscription%2Did}/reauthorize", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Reauthorize a subscription when you receive a reauthorizationRequired challenge. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/subscription-reauthorize?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Reauthorize a subscription when you receive a reauthorizationRequired challenge. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ReauthorizeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReauthorizeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReauthorizeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReauthorizeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/item/subscription_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/item/subscription_item_request_builder.py new file mode 100644 index 00000000000..e518521e518 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/item/subscription_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.subscription import Subscription + from .reauthorize.reauthorize_request_builder import ReauthorizeRequestBuilder + +class SubscriptionItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the subscriptions property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SubscriptionItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/subscriptions/{subscription%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property subscriptions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[SubscriptionItemRequestBuilderGetQueryParameters]] = None) -> Optional[Subscription]: + """ + The set of subscriptions on the item. Only supported on the root of a drive. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Subscription] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.subscription import Subscription + + return await self.request_adapter.send_async(request_info, Subscription, error_mapping) + + async def patch(self,body: Subscription, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Subscription]: + """ + Update the navigation property subscriptions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Subscription] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.subscription import Subscription + + return await self.request_adapter.send_async(request_info, Subscription, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property subscriptions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SubscriptionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The set of subscriptions on the item. Only supported on the root of a drive. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Subscription, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property subscriptions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SubscriptionItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SubscriptionItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SubscriptionItemRequestBuilder(self.request_adapter, raw_url) + + @property + def reauthorize(self) -> ReauthorizeRequestBuilder: + """ + Provides operations to call the reauthorize method. + """ + from .reauthorize.reauthorize_request_builder import ReauthorizeRequestBuilder + + return ReauthorizeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SubscriptionItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SubscriptionItemRequestBuilderGetQueryParameters(): + """ + The set of subscriptions on the item. Only supported on the root of a drive. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class SubscriptionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[SubscriptionItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SubscriptionItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/subscriptions_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/subscriptions_request_builder.py new file mode 100644 index 00000000000..3d961b73212 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/subscriptions/subscriptions_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.subscription import Subscription + from .........models.subscription_collection_response import SubscriptionCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.subscription_item_request_builder import SubscriptionItemRequestBuilder + +class SubscriptionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the subscriptions property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SubscriptionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/subscriptions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_subscription_id(self,subscription_id: str) -> SubscriptionItemRequestBuilder: + """ + Provides operations to manage the subscriptions property of the microsoft.graph.driveItem entity. + param subscription_id: The unique identifier of subscription + Returns: SubscriptionItemRequestBuilder + """ + if not subscription_id: + raise TypeError("subscription_id cannot be null.") + from .item.subscription_item_request_builder import SubscriptionItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["subscription%2Did"] = subscription_id + return SubscriptionItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[SubscriptionsRequestBuilderGetQueryParameters]] = None) -> Optional[SubscriptionCollectionResponse]: + """ + The set of subscriptions on the item. Only supported on the root of a drive. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SubscriptionCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.subscription_collection_response import SubscriptionCollectionResponse + + return await self.request_adapter.send_async(request_info, SubscriptionCollectionResponse, error_mapping) + + async def post(self,body: Subscription, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Subscription]: + """ + Create new navigation property to subscriptions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Subscription] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.subscription import Subscription + + return await self.request_adapter.send_async(request_info, Subscription, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SubscriptionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The set of subscriptions on the item. Only supported on the root of a drive. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Subscription, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to subscriptions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SubscriptionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SubscriptionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SubscriptionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SubscriptionsRequestBuilderGetQueryParameters(): + """ + The set of subscriptions on the item. Only supported on the root of a drive. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class SubscriptionsRequestBuilderGetRequestConfiguration(RequestConfiguration[SubscriptionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SubscriptionsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/count/count_request_builder.py new file mode 100644 index 00000000000..175afefbfcc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/thumbnails/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/item/thumbnail_set_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/item/thumbnail_set_item_request_builder.py new file mode 100644 index 00000000000..dcce4f3c67a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/item/thumbnail_set_item_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.thumbnail_set import ThumbnailSet + +class ThumbnailSetItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the thumbnails property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ThumbnailSetItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/thumbnails/{thumbnailSet%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property thumbnails for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ThumbnailSetItemRequestBuilderGetQueryParameters]] = None) -> Optional[ThumbnailSet]: + """ + Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ThumbnailSet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.thumbnail_set import ThumbnailSet + + return await self.request_adapter.send_async(request_info, ThumbnailSet, error_mapping) + + async def patch(self,body: ThumbnailSet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ThumbnailSet]: + """ + Update the navigation property thumbnails in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ThumbnailSet] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.thumbnail_set import ThumbnailSet + + return await self.request_adapter.send_async(request_info, ThumbnailSet, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property thumbnails for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ThumbnailSetItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ThumbnailSet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property thumbnails in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ThumbnailSetItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ThumbnailSetItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ThumbnailSetItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ThumbnailSetItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ThumbnailSetItemRequestBuilderGetQueryParameters(): + """ + Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ThumbnailSetItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ThumbnailSetItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ThumbnailSetItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/thumbnails_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/thumbnails_request_builder.py new file mode 100644 index 00000000000..de38e42cb5a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/thumbnails/thumbnails_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.thumbnail_set import ThumbnailSet + from .........models.thumbnail_set_collection_response import ThumbnailSetCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.thumbnail_set_item_request_builder import ThumbnailSetItemRequestBuilder + +class ThumbnailsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the thumbnails property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ThumbnailsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/thumbnails{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_thumbnail_set_id(self,thumbnail_set_id: str) -> ThumbnailSetItemRequestBuilder: + """ + Provides operations to manage the thumbnails property of the microsoft.graph.driveItem entity. + param thumbnail_set_id: The unique identifier of thumbnailSet + Returns: ThumbnailSetItemRequestBuilder + """ + if not thumbnail_set_id: + raise TypeError("thumbnail_set_id cannot be null.") + from .item.thumbnail_set_item_request_builder import ThumbnailSetItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["thumbnailSet%2Did"] = thumbnail_set_id + return ThumbnailSetItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ThumbnailsRequestBuilderGetQueryParameters]] = None) -> Optional[ThumbnailSetCollectionResponse]: + """ + Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ThumbnailSetCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.thumbnail_set_collection_response import ThumbnailSetCollectionResponse + + return await self.request_adapter.send_async(request_info, ThumbnailSetCollectionResponse, error_mapping) + + async def post(self,body: ThumbnailSet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ThumbnailSet]: + """ + Create new navigation property to thumbnails for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ThumbnailSet] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.thumbnail_set import ThumbnailSet + + return await self.request_adapter.send_async(request_info, ThumbnailSet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ThumbnailsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ThumbnailSet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to thumbnails for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ThumbnailsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ThumbnailsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ThumbnailsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ThumbnailsRequestBuilderGetQueryParameters(): + """ + Collection of thumbnailSet objects associated with the item. For more information, see getting thumbnails. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ThumbnailsRequestBuilderGetRequestConfiguration(RequestConfiguration[ThumbnailsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ThumbnailsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/unfollow/unfollow_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/unfollow/unfollow_request_builder.py new file mode 100644 index 00000000000..a84e86e7c2d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/unfollow/unfollow_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class UnfollowRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the unfollow method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new UnfollowRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/unfollow", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Unfollow a driveItem. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/driveitem-unfollow?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Unfollow a driveItem. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> UnfollowRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: UnfollowRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return UnfollowRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class UnfollowRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/validate_permission/validate_permission_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/validate_permission/validate_permission_post_request_body.py new file mode 100644 index 00000000000..5801740868a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/validate_permission/validate_permission_post_request_body.py @@ -0,0 +1,53 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ValidatePermissionPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The challengeToken property + challenge_token: Optional[str] = None + # The password property + password: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ValidatePermissionPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ValidatePermissionPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ValidatePermissionPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "challengeToken": lambda n : setattr(self, 'challenge_token', n.get_str_value()), + "password": lambda n : setattr(self, 'password', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("challengeToken", self.challenge_token) + writer.write_str_value("password", self.password) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/validate_permission/validate_permission_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/validate_permission/validate_permission_request_builder.py new file mode 100644 index 00000000000..185e9af7af7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/validate_permission/validate_permission_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .validate_permission_post_request_body import ValidatePermissionPostRequestBody + +class ValidatePermissionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the validatePermission method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ValidatePermissionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/validatePermission", path_parameters) + + async def post(self,body: ValidatePermissionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action validatePermission + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ValidatePermissionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action validatePermission + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ValidatePermissionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ValidatePermissionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ValidatePermissionRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ValidatePermissionRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/count/count_request_builder.py new file mode 100644 index 00000000000..3c9a3b7de8e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/versions/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/content/content_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/content/content_request_builder.py new file mode 100644 index 00000000000..c843b37381f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/content/content_request_builder.py @@ -0,0 +1,159 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.drive_item_version import DriveItemVersion + from ...........models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the storage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/versions/{driveItemVersion%2Did}/content", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + The content stream for this version of the item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> bytes: + """ + The content stream for this version of the item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItemVersion]: + """ + The content stream for this version of the item. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItemVersion] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.drive_item_version import DriveItemVersion + + return await self.request_adapter.send_async(request_info, DriveItemVersion, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream for this version of the item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream for this version of the item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/octet-stream, application/json") + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream for this version of the item. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body, "application/octet-stream") + return request_info + + def with_url(self,raw_url: str) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ContentRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/drive_item_version_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/drive_item_version_item_request_builder.py new file mode 100644 index 00000000000..3b4c9107cd1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/drive_item_version_item_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.drive_item_version import DriveItemVersion + from ..........models.o_data_errors.o_data_error import ODataError + from .content.content_request_builder import ContentRequestBuilder + from .restore_version.restore_version_request_builder import RestoreVersionRequestBuilder + +class DriveItemVersionItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the versions property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DriveItemVersionItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/versions/{driveItemVersion%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property versions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[DriveItemVersionItemRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItemVersion]: + """ + The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItemVersion] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.drive_item_version import DriveItemVersion + + return await self.request_adapter.send_async(request_info, DriveItemVersion, error_mapping) + + async def patch(self,body: DriveItemVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItemVersion]: + """ + Update the navigation property versions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItemVersion] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.drive_item_version import DriveItemVersion + + return await self.request_adapter.send_async(request_info, DriveItemVersion, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property versions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DriveItemVersionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: DriveItemVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property versions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DriveItemVersionItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DriveItemVersionItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DriveItemVersionItemRequestBuilder(self.request_adapter, raw_url) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the storage entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def restore_version(self) -> RestoreVersionRequestBuilder: + """ + Provides operations to call the restoreVersion method. + """ + from .restore_version.restore_version_request_builder import RestoreVersionRequestBuilder + + return RestoreVersionRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DriveItemVersionItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DriveItemVersionItemRequestBuilderGetQueryParameters(): + """ + The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DriveItemVersionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[DriveItemVersionItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DriveItemVersionItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/restore_version/restore_version_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/restore_version/restore_version_request_builder.py new file mode 100644 index 00000000000..c883e6790bb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/item/restore_version/restore_version_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class RestoreVersionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the restoreVersion method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RestoreVersionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/versions/{driveItemVersion%2Did}/restoreVersion", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Restore a previous version of a DriveItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/driveitemversion-restore?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Restore a previous version of a DriveItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RestoreVersionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RestoreVersionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RestoreVersionRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RestoreVersionRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/versions_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/versions_request_builder.py new file mode 100644 index 00000000000..c6579ea8e37 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/versions/versions_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.drive_item_version import DriveItemVersion + from .........models.drive_item_version_collection_response import DriveItemVersionCollectionResponse + from .........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.drive_item_version_item_request_builder import DriveItemVersionItemRequestBuilder + +class VersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the versions property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new VersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/versions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_drive_item_version_id(self,drive_item_version_id: str) -> DriveItemVersionItemRequestBuilder: + """ + Provides operations to manage the versions property of the microsoft.graph.driveItem entity. + param drive_item_version_id: The unique identifier of driveItemVersion + Returns: DriveItemVersionItemRequestBuilder + """ + if not drive_item_version_id: + raise TypeError("drive_item_version_id cannot be null.") + from .item.drive_item_version_item_request_builder import DriveItemVersionItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["driveItemVersion%2Did"] = drive_item_version_id + return DriveItemVersionItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[VersionsRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItemVersionCollectionResponse]: + """ + The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItemVersionCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item_version_collection_response import DriveItemVersionCollectionResponse + + return await self.request_adapter.send_async(request_info, DriveItemVersionCollectionResponse, error_mapping) + + async def post(self,body: DriveItemVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItemVersion]: + """ + Create new navigation property to versions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItemVersion] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item_version import DriveItemVersion + + return await self.request_adapter.send_async(request_info, DriveItemVersion, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[VersionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: DriveItemVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to versions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> VersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: VersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return VersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class VersionsRequestBuilderGetQueryParameters(): + """ + The list of previous versions of the item. For more info, see getting previous versions. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class VersionsRequestBuilderGetRequestConfiguration(RequestConfiguration[VersionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class VersionsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/application_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/application_request_builder.py new file mode 100644 index 00000000000..b126364e82f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/application_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.workbook_application import WorkbookApplication + from .calculate.calculate_request_builder import CalculateRequestBuilder + +class ApplicationRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the application property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplicationRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/application{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property application for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ApplicationRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookApplication]: + """ + Get application from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookApplication] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_application import WorkbookApplication + + return await self.request_adapter.send_async(request_info, WorkbookApplication, error_mapping) + + async def patch(self,body: WorkbookApplication, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookApplication]: + """ + Update the navigation property application in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookApplication] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_application import WorkbookApplication + + return await self.request_adapter.send_async(request_info, WorkbookApplication, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property application for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ApplicationRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get application from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookApplication, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property application in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplicationRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplicationRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplicationRequestBuilder(self.request_adapter, raw_url) + + @property + def calculate(self) -> CalculateRequestBuilder: + """ + Provides operations to call the calculate method. + """ + from .calculate.calculate_request_builder import CalculateRequestBuilder + + return CalculateRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ApplicationRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ApplicationRequestBuilderGetQueryParameters(): + """ + Get application from storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ApplicationRequestBuilderGetRequestConfiguration(RequestConfiguration[ApplicationRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ApplicationRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/calculate/calculate_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/calculate/calculate_post_request_body.py new file mode 100644 index 00000000000..012301c633d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/calculate/calculate_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CalculatePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The calculationType property + calculation_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CalculatePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CalculatePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CalculatePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "calculationType": lambda n : setattr(self, 'calculation_type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("calculationType", self.calculation_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/calculate/calculate_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/calculate/calculate_request_builder.py new file mode 100644 index 00000000000..2a6a36dc960 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/application/calculate/calculate_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from .calculate_post_request_body import CalculatePostRequestBody + +class CalculateRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the calculate method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CalculateRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/application/calculate", path_parameters) + + async def post(self,body: CalculatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Recalculate all currently opened workbooks in Excel. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/workbookapplication-calculate?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: CalculatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Recalculate all currently opened workbooks in Excel. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CalculateRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CalculateRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CalculateRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CalculateRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/close_session/close_session_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/close_session/close_session_request_builder.py new file mode 100644 index 00000000000..684c37770ad --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/close_session/close_session_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class CloseSessionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the closeSession method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CloseSessionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/closeSession", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Use this API to close an existing workbook session. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/workbook-closesession?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Use this API to close an existing workbook session. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CloseSessionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CloseSessionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CloseSessionRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CloseSessionRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/comments_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/comments_request_builder.py new file mode 100644 index 00000000000..7691ad6ee3f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/comments_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.workbook_comment import WorkbookComment + from ..........models.workbook_comment_collection_response import WorkbookCommentCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_comment_item_request_builder import WorkbookCommentItemRequestBuilder + +class CommentsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the comments property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CommentsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/comments{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_comment_id(self,workbook_comment_id: str) -> WorkbookCommentItemRequestBuilder: + """ + Provides operations to manage the comments property of the microsoft.graph.workbook entity. + param workbook_comment_id: The unique identifier of workbookComment + Returns: WorkbookCommentItemRequestBuilder + """ + if not workbook_comment_id: + raise TypeError("workbook_comment_id cannot be null.") + from .item.workbook_comment_item_request_builder import WorkbookCommentItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookComment%2Did"] = workbook_comment_id + return WorkbookCommentItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[CommentsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookCommentCollectionResponse]: + """ + Represents a collection of comments in a workbook. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookCommentCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_comment_collection_response import WorkbookCommentCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookCommentCollectionResponse, error_mapping) + + async def post(self,body: WorkbookComment, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookComment]: + """ + Create new navigation property to comments for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookComment] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_comment import WorkbookComment + + return await self.request_adapter.send_async(request_info, WorkbookComment, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CommentsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of comments in a workbook. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookComment, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to comments for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CommentsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CommentsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CommentsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CommentsRequestBuilderGetQueryParameters(): + """ + Represents a collection of comments in a workbook. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class CommentsRequestBuilderGetRequestConfiguration(RequestConfiguration[CommentsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class CommentsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/count/count_request_builder.py new file mode 100644 index 00000000000..685f439a2df --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/comments/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/count/count_request_builder.py new file mode 100644 index 00000000000..60f83cb08d2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}/replies/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.py new file mode 100644 index 00000000000..d6a49b8b300 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/item/workbook_comment_reply_item_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_comment_reply import WorkbookCommentReply + +class WorkbookCommentReplyItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the replies property of the microsoft.graph.workbookComment entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookCommentReplyItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}/replies/{workbookCommentReply%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property replies for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookCommentReplyItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookCommentReply]: + """ + Get replies from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookCommentReply] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_comment_reply import WorkbookCommentReply + + return await self.request_adapter.send_async(request_info, WorkbookCommentReply, error_mapping) + + async def patch(self,body: WorkbookCommentReply, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookCommentReply]: + """ + Update the navigation property replies in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookCommentReply] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_comment_reply import WorkbookCommentReply + + return await self.request_adapter.send_async(request_info, WorkbookCommentReply, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property replies for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookCommentReplyItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get replies from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookCommentReply, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property replies in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookCommentReplyItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookCommentReplyItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookCommentReplyItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorkbookCommentReplyItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookCommentReplyItemRequestBuilderGetQueryParameters(): + """ + Get replies from storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookCommentReplyItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookCommentReplyItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookCommentReplyItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/replies_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/replies_request_builder.py new file mode 100644 index 00000000000..73f84feb73d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/replies/replies_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_comment_reply import WorkbookCommentReply + from ............models.workbook_comment_reply_collection_response import WorkbookCommentReplyCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_comment_reply_item_request_builder import WorkbookCommentReplyItemRequestBuilder + +class RepliesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the replies property of the microsoft.graph.workbookComment entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RepliesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}/replies{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_comment_reply_id(self,workbook_comment_reply_id: str) -> WorkbookCommentReplyItemRequestBuilder: + """ + Provides operations to manage the replies property of the microsoft.graph.workbookComment entity. + param workbook_comment_reply_id: The unique identifier of workbookCommentReply + Returns: WorkbookCommentReplyItemRequestBuilder + """ + if not workbook_comment_reply_id: + raise TypeError("workbook_comment_reply_id cannot be null.") + from .item.workbook_comment_reply_item_request_builder import WorkbookCommentReplyItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookCommentReply%2Did"] = workbook_comment_reply_id + return WorkbookCommentReplyItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[RepliesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookCommentReplyCollectionResponse]: + """ + Get replies from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookCommentReplyCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_comment_reply_collection_response import WorkbookCommentReplyCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookCommentReplyCollectionResponse, error_mapping) + + async def post(self,body: WorkbookCommentReply, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookCommentReply]: + """ + Create new navigation property to replies for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookCommentReply] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_comment_reply import WorkbookCommentReply + + return await self.request_adapter.send_async(request_info, WorkbookCommentReply, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RepliesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get replies from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookCommentReply, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to replies for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RepliesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RepliesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RepliesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class RepliesRequestBuilderGetQueryParameters(): + """ + Get replies from storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class RepliesRequestBuilderGetRequestConfiguration(RequestConfiguration[RepliesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RepliesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/workbook_comment_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/workbook_comment_item_request_builder.py new file mode 100644 index 00000000000..07d434829bb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/comments/item/workbook_comment_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_comment import WorkbookComment + from .replies.replies_request_builder import RepliesRequestBuilder + +class WorkbookCommentItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the comments property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookCommentItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/comments/{workbookComment%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property comments for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookCommentItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookComment]: + """ + Represents a collection of comments in a workbook. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookComment] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_comment import WorkbookComment + + return await self.request_adapter.send_async(request_info, WorkbookComment, error_mapping) + + async def patch(self,body: WorkbookComment, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookComment]: + """ + Update the navigation property comments in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookComment] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_comment import WorkbookComment + + return await self.request_adapter.send_async(request_info, WorkbookComment, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property comments for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookCommentItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of comments in a workbook. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookComment, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property comments in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookCommentItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookCommentItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookCommentItemRequestBuilder(self.request_adapter, raw_url) + + @property + def replies(self) -> RepliesRequestBuilder: + """ + Provides operations to manage the replies property of the microsoft.graph.workbookComment entity. + """ + from .replies.replies_request_builder import RepliesRequestBuilder + + return RepliesRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookCommentItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookCommentItemRequestBuilderGetQueryParameters(): + """ + Represents a collection of comments in a workbook. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookCommentItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookCommentItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookCommentItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/create_session/create_session_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/create_session/create_session_post_request_body.py new file mode 100644 index 00000000000..2d2af12c158 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/create_session/create_session_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CreateSessionPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The persistChanges property + persist_changes: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CreateSessionPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CreateSessionPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CreateSessionPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "persistChanges": lambda n : setattr(self, 'persist_changes', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("persistChanges", self.persist_changes) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/create_session/create_session_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/create_session/create_session_request_builder.py new file mode 100644 index 00000000000..d88e1f317f9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/create_session/create_session_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.workbook_session_info import WorkbookSessionInfo + from .create_session_post_request_body import CreateSessionPostRequestBody + +class CreateSessionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the createSession method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CreateSessionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/createSession", path_parameters) + + async def post(self,body: CreateSessionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookSessionInfo]: + """ + Create a new workbook session. Excel APIs can be called in one of two modes: To represent the session in the API, use the workbook-session-id: {session-id} header. In some cases, creating a new session requires an indeterminate time to complete. Microsoft Graph also provides a long running operations pattern. This pattern provides a way to poll for creation status updates, without waiting for the creation to complete. The following are the steps: + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookSessionInfo] + Find more info here: https://learn.microsoft.com/graph/api/workbook-createsession?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_session_info import WorkbookSessionInfo + + return await self.request_adapter.send_async(request_info, WorkbookSessionInfo, error_mapping) + + def to_post_request_information(self,body: CreateSessionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create a new workbook session. Excel APIs can be called in one of two modes: To represent the session in the API, use the workbook-session-id: {session-id} header. In some cases, creating a new session requires an indeterminate time to complete. Microsoft Graph also provides a long running operations pattern. This pattern provides a way to poll for creation status updates, without waiting for the creation to complete. The following are the steps: + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CreateSessionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CreateSessionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CreateSessionRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CreateSessionRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/abs/abs_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/abs/abs_post_request_body.py new file mode 100644 index 00000000000..c40ce86b92e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/abs/abs_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AbsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AbsPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AbsPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AbsPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/abs/abs_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/abs/abs_request_builder.py new file mode 100644 index 00000000000..2d71447f245 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/abs/abs_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .abs_post_request_body import AbsPostRequestBody + +class AbsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the abs method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AbsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/abs", path_parameters) + + async def post(self,body: AbsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action abs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AbsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action abs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AbsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AbsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AbsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AbsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int/accr_int_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int/accr_int_post_request_body.py new file mode 100644 index 00000000000..f852673c7cf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int/accr_int_post_request_body.py @@ -0,0 +1,84 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AccrIntPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The calcMethod property + calc_method: Optional[Json] = None + # The firstInterest property + first_interest: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The issue property + issue: Optional[Json] = None + # The par property + par: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AccrIntPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AccrIntPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AccrIntPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "calcMethod": lambda n : setattr(self, 'calc_method', n.get_object_value(Json)), + "firstInterest": lambda n : setattr(self, 'first_interest', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "issue": lambda n : setattr(self, 'issue', n.get_object_value(Json)), + "par": lambda n : setattr(self, 'par', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("calcMethod", self.calc_method) + writer.write_object_value("firstInterest", self.first_interest) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("issue", self.issue) + writer.write_object_value("par", self.par) + writer.write_object_value("rate", self.rate) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int/accr_int_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int/accr_int_request_builder.py new file mode 100644 index 00000000000..53acf43470f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int/accr_int_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .accr_int_post_request_body import AccrIntPostRequestBody + +class AccrIntRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the accrInt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AccrIntRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/accrInt", path_parameters) + + async def post(self,body: AccrIntPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action accrInt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AccrIntPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action accrInt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AccrIntRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AccrIntRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AccrIntRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AccrIntRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int_m/accr_int_m_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int_m/accr_int_m_post_request_body.py new file mode 100644 index 00000000000..2b9a9eada93 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int_m/accr_int_m_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AccrIntMPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The issue property + issue: Optional[Json] = None + # The par property + par: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AccrIntMPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AccrIntMPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AccrIntMPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "issue": lambda n : setattr(self, 'issue', n.get_object_value(Json)), + "par": lambda n : setattr(self, 'par', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("issue", self.issue) + writer.write_object_value("par", self.par) + writer.write_object_value("rate", self.rate) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.py new file mode 100644 index 00000000000..459ece31d3e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/accr_int_m/accr_int_m_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .accr_int_m_post_request_body import AccrIntMPostRequestBody + +class AccrIntMRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the accrIntM method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AccrIntMRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/accrIntM", path_parameters) + + async def post(self,body: AccrIntMPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action accrIntM + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AccrIntMPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action accrIntM + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AccrIntMRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AccrIntMRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AccrIntMRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AccrIntMRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acos/acos_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acos/acos_post_request_body.py new file mode 100644 index 00000000000..3b10e26ccda --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acos/acos_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AcosPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AcosPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AcosPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AcosPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acos/acos_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acos/acos_request_builder.py new file mode 100644 index 00000000000..9aa4062fa7b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acos/acos_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .acos_post_request_body import AcosPostRequestBody + +class AcosRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the acos method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AcosRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/acos", path_parameters) + + async def post(self,body: AcosPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action acos + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AcosPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action acos + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AcosRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AcosRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AcosRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AcosRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acosh/acosh_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acosh/acosh_post_request_body.py new file mode 100644 index 00000000000..0a43a89f758 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acosh/acosh_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AcoshPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AcoshPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AcoshPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AcoshPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acosh/acosh_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acosh/acosh_request_builder.py new file mode 100644 index 00000000000..8eb4ea4ae37 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acosh/acosh_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .acosh_post_request_body import AcoshPostRequestBody + +class AcoshRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the acosh method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AcoshRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/acosh", path_parameters) + + async def post(self,body: AcoshPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action acosh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AcoshPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action acosh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AcoshRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AcoshRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AcoshRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AcoshRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acot/acot_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acot/acot_post_request_body.py new file mode 100644 index 00000000000..73209b3aece --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acot/acot_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AcotPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AcotPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AcotPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AcotPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acot/acot_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acot/acot_request_builder.py new file mode 100644 index 00000000000..5014ded6a61 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acot/acot_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .acot_post_request_body import AcotPostRequestBody + +class AcotRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the acot method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AcotRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/acot", path_parameters) + + async def post(self,body: AcotPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action acot + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AcotPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action acot + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AcotRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AcotRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AcotRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AcotRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acoth/acoth_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acoth/acoth_post_request_body.py new file mode 100644 index 00000000000..132c23971d1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acoth/acoth_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AcothPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AcothPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AcothPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AcothPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acoth/acoth_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acoth/acoth_request_builder.py new file mode 100644 index 00000000000..14a70b93b99 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/acoth/acoth_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .acoth_post_request_body import AcothPostRequestBody + +class AcothRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the acoth method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AcothRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/acoth", path_parameters) + + async def post(self,body: AcothPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action acoth + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AcothPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action acoth + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AcothRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AcothRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AcothRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AcothRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_degrc/amor_degrc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_degrc/amor_degrc_post_request_body.py new file mode 100644 index 00000000000..87fd5813782 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_degrc/amor_degrc_post_request_body.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AmorDegrcPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The cost property + cost: Optional[Json] = None + # The datePurchased property + date_purchased: Optional[Json] = None + # The firstPeriod property + first_period: Optional[Json] = None + # The period property + period: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The salvage property + salvage: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AmorDegrcPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AmorDegrcPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AmorDegrcPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "cost": lambda n : setattr(self, 'cost', n.get_object_value(Json)), + "datePurchased": lambda n : setattr(self, 'date_purchased', n.get_object_value(Json)), + "firstPeriod": lambda n : setattr(self, 'first_period', n.get_object_value(Json)), + "period": lambda n : setattr(self, 'period', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "salvage": lambda n : setattr(self, 'salvage', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("cost", self.cost) + writer.write_object_value("datePurchased", self.date_purchased) + writer.write_object_value("firstPeriod", self.first_period) + writer.write_object_value("period", self.period) + writer.write_object_value("rate", self.rate) + writer.write_object_value("salvage", self.salvage) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.py new file mode 100644 index 00000000000..cc9e4055d94 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_degrc/amor_degrc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .amor_degrc_post_request_body import AmorDegrcPostRequestBody + +class AmorDegrcRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the amorDegrc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AmorDegrcRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/amorDegrc", path_parameters) + + async def post(self,body: AmorDegrcPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action amorDegrc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AmorDegrcPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action amorDegrc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AmorDegrcRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AmorDegrcRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AmorDegrcRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AmorDegrcRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_linc/amor_linc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_linc/amor_linc_post_request_body.py new file mode 100644 index 00000000000..75d51cf47e2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_linc/amor_linc_post_request_body.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AmorLincPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The cost property + cost: Optional[Json] = None + # The datePurchased property + date_purchased: Optional[Json] = None + # The firstPeriod property + first_period: Optional[Json] = None + # The period property + period: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The salvage property + salvage: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AmorLincPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AmorLincPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AmorLincPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "cost": lambda n : setattr(self, 'cost', n.get_object_value(Json)), + "datePurchased": lambda n : setattr(self, 'date_purchased', n.get_object_value(Json)), + "firstPeriod": lambda n : setattr(self, 'first_period', n.get_object_value(Json)), + "period": lambda n : setattr(self, 'period', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "salvage": lambda n : setattr(self, 'salvage', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("cost", self.cost) + writer.write_object_value("datePurchased", self.date_purchased) + writer.write_object_value("firstPeriod", self.first_period) + writer.write_object_value("period", self.period) + writer.write_object_value("rate", self.rate) + writer.write_object_value("salvage", self.salvage) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_linc/amor_linc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_linc/amor_linc_request_builder.py new file mode 100644 index 00000000000..7c4b52b165b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/amor_linc/amor_linc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .amor_linc_post_request_body import AmorLincPostRequestBody + +class AmorLincRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the amorLinc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AmorLincRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/amorLinc", path_parameters) + + async def post(self,body: AmorLincPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action amorLinc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AmorLincPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action amorLinc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AmorLincRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AmorLincRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AmorLincRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AmorLincRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/and_/and_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/and_/and_post_request_body.py new file mode 100644 index 00000000000..e2e4ed93a9d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/and_/and_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AndPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AndPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AndPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AndPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/and_/and_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/and_/and_request_builder.py new file mode 100644 index 00000000000..ee7af11fee2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/and_/and_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .and_post_request_body import AndPostRequestBody + +class AndRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the and method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AndRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/and", path_parameters) + + async def post(self,body: AndPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action and + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AndPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action and + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AndRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AndRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AndRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AndRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/arabic/arabic_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/arabic/arabic_post_request_body.py new file mode 100644 index 00000000000..a48a730fb61 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/arabic/arabic_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ArabicPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ArabicPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ArabicPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ArabicPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/arabic/arabic_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/arabic/arabic_request_builder.py new file mode 100644 index 00000000000..7c2ddaaa88e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/arabic/arabic_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .arabic_post_request_body import ArabicPostRequestBody + +class ArabicRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the arabic method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ArabicRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/arabic", path_parameters) + + async def post(self,body: ArabicPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action arabic + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ArabicPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action arabic + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ArabicRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ArabicRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ArabicRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ArabicRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/areas/areas_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/areas/areas_post_request_body.py new file mode 100644 index 00000000000..e6182fbd690 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/areas/areas_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AreasPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The reference property + reference: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AreasPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AreasPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AreasPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "reference": lambda n : setattr(self, 'reference', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("reference", self.reference) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/areas/areas_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/areas/areas_request_builder.py new file mode 100644 index 00000000000..d70d4a8a529 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/areas/areas_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .areas_post_request_body import AreasPostRequestBody + +class AreasRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the areas method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AreasRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/areas", path_parameters) + + async def post(self,body: AreasPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action areas + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AreasPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action areas + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AreasRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AreasRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AreasRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AreasRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asc/asc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asc/asc_post_request_body.py new file mode 100644 index 00000000000..71920c2f6b8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asc/asc_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AscPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AscPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AscPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AscPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asc/asc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asc/asc_request_builder.py new file mode 100644 index 00000000000..66675d27035 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asc/asc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .asc_post_request_body import AscPostRequestBody + +class AscRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the asc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AscRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/asc", path_parameters) + + async def post(self,body: AscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action asc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action asc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AscRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AscRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AscRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AscRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asin/asin_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asin/asin_post_request_body.py new file mode 100644 index 00000000000..efd0c9a2957 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asin/asin_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AsinPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AsinPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AsinPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AsinPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asin/asin_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asin/asin_request_builder.py new file mode 100644 index 00000000000..0336ad90b71 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asin/asin_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .asin_post_request_body import AsinPostRequestBody + +class AsinRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the asin method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AsinRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/asin", path_parameters) + + async def post(self,body: AsinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action asin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AsinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action asin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AsinRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AsinRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AsinRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AsinRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asinh/asinh_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asinh/asinh_post_request_body.py new file mode 100644 index 00000000000..929d23f65c3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asinh/asinh_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AsinhPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AsinhPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AsinhPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AsinhPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asinh/asinh_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asinh/asinh_request_builder.py new file mode 100644 index 00000000000..8aebb36989c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/asinh/asinh_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .asinh_post_request_body import AsinhPostRequestBody + +class AsinhRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the asinh method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AsinhRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/asinh", path_parameters) + + async def post(self,body: AsinhPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action asinh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AsinhPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action asinh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AsinhRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AsinhRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AsinhRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AsinhRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan/atan_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan/atan_post_request_body.py new file mode 100644 index 00000000000..547a0c40b39 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan/atan_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AtanPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AtanPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AtanPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AtanPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan/atan_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan/atan_request_builder.py new file mode 100644 index 00000000000..37f4ee536be --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan/atan_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .atan_post_request_body import AtanPostRequestBody + +class AtanRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the atan method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AtanRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/atan", path_parameters) + + async def post(self,body: AtanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action atan + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AtanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action atan + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AtanRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AtanRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AtanRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AtanRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan2/atan2_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan2/atan2_post_request_body.py new file mode 100644 index 00000000000..def622c0a77 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan2/atan2_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Atan2PostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The xNum property + x_num: Optional[Json] = None + # The yNum property + y_num: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Atan2PostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Atan2PostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Atan2PostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "xNum": lambda n : setattr(self, 'x_num', n.get_object_value(Json)), + "yNum": lambda n : setattr(self, 'y_num', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("xNum", self.x_num) + writer.write_object_value("yNum", self.y_num) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan2/atan2_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan2/atan2_request_builder.py new file mode 100644 index 00000000000..be4aee3843d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atan2/atan2_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .atan2_post_request_body import Atan2PostRequestBody + +class Atan2RequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the atan2 method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Atan2RequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/atan2", path_parameters) + + async def post(self,body: Atan2PostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action atan2 + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Atan2PostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action atan2 + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Atan2RequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Atan2RequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Atan2RequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Atan2RequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atanh/atanh_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atanh/atanh_post_request_body.py new file mode 100644 index 00000000000..d7cfe30eaeb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atanh/atanh_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AtanhPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AtanhPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AtanhPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AtanhPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atanh/atanh_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atanh/atanh_request_builder.py new file mode 100644 index 00000000000..8697a4af857 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/atanh/atanh_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .atanh_post_request_body import AtanhPostRequestBody + +class AtanhRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the atanh method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AtanhRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/atanh", path_parameters) + + async def post(self,body: AtanhPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action atanh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AtanhPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action atanh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AtanhRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AtanhRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AtanhRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AtanhRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ave_dev/ave_dev_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ave_dev/ave_dev_post_request_body.py new file mode 100644 index 00000000000..2fbf680ff49 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ave_dev/ave_dev_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AveDevPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AveDevPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AveDevPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AveDevPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ave_dev/ave_dev_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ave_dev/ave_dev_request_builder.py new file mode 100644 index 00000000000..2fbab83bed8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ave_dev/ave_dev_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .ave_dev_post_request_body import AveDevPostRequestBody + +class AveDevRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the aveDev method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AveDevRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/aveDev", path_parameters) + + async def post(self,body: AveDevPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action aveDev + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AveDevPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action aveDev + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AveDevRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AveDevRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AveDevRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AveDevRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average/average_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average/average_post_request_body.py new file mode 100644 index 00000000000..1758f0b5793 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average/average_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AveragePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AveragePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AveragePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AveragePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average/average_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average/average_request_builder.py new file mode 100644 index 00000000000..86daa25440d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average/average_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .average_post_request_body import AveragePostRequestBody + +class AverageRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the average method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AverageRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/average", path_parameters) + + async def post(self,body: AveragePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action average + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AveragePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action average + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AverageRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AverageRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AverageRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AverageRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_a/average_a_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_a/average_a_post_request_body.py new file mode 100644 index 00000000000..3cf2d3c2d4c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_a/average_a_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AverageAPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AverageAPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AverageAPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AverageAPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_a/average_a_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_a/average_a_request_builder.py new file mode 100644 index 00000000000..b0e10816651 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_a/average_a_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .average_a_post_request_body import AverageAPostRequestBody + +class AverageARequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the averageA method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AverageARequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/averageA", path_parameters) + + async def post(self,body: AverageAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action averageA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AverageAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action averageA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AverageARequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AverageARequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AverageARequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AverageARequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_if/average_if_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_if/average_if_post_request_body.py new file mode 100644 index 00000000000..717bb0983aa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_if/average_if_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AverageIfPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The averageRange property + average_range: Optional[Json] = None + # The criteria property + criteria: Optional[Json] = None + # The range property + range: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AverageIfPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AverageIfPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AverageIfPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "averageRange": lambda n : setattr(self, 'average_range', n.get_object_value(Json)), + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "range": lambda n : setattr(self, 'range', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("averageRange", self.average_range) + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("range", self.range) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_if/average_if_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_if/average_if_request_builder.py new file mode 100644 index 00000000000..10c0a00cf39 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_if/average_if_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .average_if_post_request_body import AverageIfPostRequestBody + +class AverageIfRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the averageIf method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AverageIfRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/averageIf", path_parameters) + + async def post(self,body: AverageIfPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action averageIf + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AverageIfPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action averageIf + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AverageIfRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AverageIfRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AverageIfRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AverageIfRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_ifs/average_ifs_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_ifs/average_ifs_post_request_body.py new file mode 100644 index 00000000000..9a6430a9f73 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_ifs/average_ifs_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AverageIfsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The averageRange property + average_range: Optional[Json] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AverageIfsPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AverageIfsPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AverageIfsPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "averageRange": lambda n : setattr(self, 'average_range', n.get_object_value(Json)), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("averageRange", self.average_range) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_ifs/average_ifs_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_ifs/average_ifs_request_builder.py new file mode 100644 index 00000000000..c9a12d9296c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/average_ifs/average_ifs_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .average_ifs_post_request_body import AverageIfsPostRequestBody + +class AverageIfsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the averageIfs method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AverageIfsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/averageIfs", path_parameters) + + async def post(self,body: AverageIfsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action averageIfs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: AverageIfsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action averageIfs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AverageIfsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AverageIfsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AverageIfsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AverageIfsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/baht_text/baht_text_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/baht_text/baht_text_post_request_body.py new file mode 100644 index 00000000000..f53aa12b6b7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/baht_text/baht_text_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BahtTextPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BahtTextPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BahtTextPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BahtTextPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/baht_text/baht_text_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/baht_text/baht_text_request_builder.py new file mode 100644 index 00000000000..ad05d4fed96 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/baht_text/baht_text_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .baht_text_post_request_body import BahtTextPostRequestBody + +class BahtTextRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the bahtText method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BahtTextRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/bahtText", path_parameters) + + async def post(self,body: BahtTextPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action bahtText + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BahtTextPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action bahtText + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BahtTextRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BahtTextRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BahtTextRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class BahtTextRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/base/base_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/base/base_post_request_body.py new file mode 100644 index 00000000000..f80eb183145 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/base/base_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BasePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The minLength property + min_length: Optional[Json] = None + # The number property + number: Optional[Json] = None + # The radix property + radix: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BasePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BasePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BasePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "minLength": lambda n : setattr(self, 'min_length', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "radix": lambda n : setattr(self, 'radix', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("minLength", self.min_length) + writer.write_object_value("number", self.number) + writer.write_object_value("radix", self.radix) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/base/base_request_builder_.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/base/base_request_builder_.py new file mode 100644 index 00000000000..5ba415836a6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/base/base_request_builder_.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .base_post_request_body import BasePostRequestBody + +class BaseRequestBuilder_(BaseRequestBuilder): + """ + Provides operations to call the base method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BaseRequestBuilder_ and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/base", path_parameters) + + async def post(self,body: BasePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action base + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BasePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action base + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BaseRequestBuilder_: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BaseRequestBuilder_ + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BaseRequestBuilder_(self.request_adapter, raw_url) + + @dataclass + class BaseRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_i/bessel_i_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_i/bessel_i_post_request_body.py new file mode 100644 index 00000000000..44d9217fcc5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_i/bessel_i_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BesselIPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The n property + n: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BesselIPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BesselIPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BesselIPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "n": lambda n : setattr(self, 'n', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("n", self.n) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_i/bessel_i_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_i/bessel_i_request_builder.py new file mode 100644 index 00000000000..bab56c08241 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_i/bessel_i_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bessel_i_post_request_body import BesselIPostRequestBody + +class BesselIRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the besselI method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BesselIRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/besselI", path_parameters) + + async def post(self,body: BesselIPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action besselI + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BesselIPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action besselI + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BesselIRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BesselIRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BesselIRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class BesselIRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_j/bessel_j_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_j/bessel_j_post_request_body.py new file mode 100644 index 00000000000..2aa1e1b95bf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_j/bessel_j_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BesselJPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The n property + n: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BesselJPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BesselJPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BesselJPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "n": lambda n : setattr(self, 'n', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("n", self.n) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_j/bessel_j_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_j/bessel_j_request_builder.py new file mode 100644 index 00000000000..77182ad286d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_j/bessel_j_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bessel_j_post_request_body import BesselJPostRequestBody + +class BesselJRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the besselJ method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BesselJRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/besselJ", path_parameters) + + async def post(self,body: BesselJPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action besselJ + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BesselJPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action besselJ + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BesselJRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BesselJRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BesselJRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class BesselJRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_k/bessel_k_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_k/bessel_k_post_request_body.py new file mode 100644 index 00000000000..9262b7c7d15 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_k/bessel_k_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BesselKPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The n property + n: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BesselKPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BesselKPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BesselKPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "n": lambda n : setattr(self, 'n', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("n", self.n) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_k/bessel_k_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_k/bessel_k_request_builder.py new file mode 100644 index 00000000000..fa5909e65b1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_k/bessel_k_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bessel_k_post_request_body import BesselKPostRequestBody + +class BesselKRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the besselK method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BesselKRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/besselK", path_parameters) + + async def post(self,body: BesselKPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action besselK + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BesselKPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action besselK + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BesselKRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BesselKRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BesselKRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class BesselKRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_y/bessel_y_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_y/bessel_y_post_request_body.py new file mode 100644 index 00000000000..26992347ce6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_y/bessel_y_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BesselYPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The n property + n: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BesselYPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BesselYPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BesselYPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "n": lambda n : setattr(self, 'n', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("n", self.n) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_y/bessel_y_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_y/bessel_y_request_builder.py new file mode 100644 index 00000000000..c2c5fec20bc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bessel_y/bessel_y_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bessel_y_post_request_body import BesselYPostRequestBody + +class BesselYRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the besselY method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BesselYRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/besselY", path_parameters) + + async def post(self,body: BesselYPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action besselY + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BesselYPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action besselY + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BesselYRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BesselYRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BesselYRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class BesselYRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_dist/beta_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_dist/beta_dist_post_request_body.py new file mode 100644 index 00000000000..c56b4c87309 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_dist/beta_dist_post_request_body.py @@ -0,0 +1,76 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Beta_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The A property + a: Optional[Json] = None + # The alpha property + alpha: Optional[Json] = None + # The B property + b: Optional[Json] = None + # The beta property + beta: Optional[Json] = None + # The cumulative property + cumulative: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Beta_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Beta_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Beta_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "A": lambda n : setattr(self, 'a', n.get_object_value(Json)), + "alpha": lambda n : setattr(self, 'alpha', n.get_object_value(Json)), + "B": lambda n : setattr(self, 'b', n.get_object_value(Json)), + "beta": lambda n : setattr(self, 'beta', n.get_object_value(Json)), + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("A", self.a) + writer.write_object_value("alpha", self.alpha) + writer.write_object_value("B", self.b) + writer.write_object_value("beta", self.beta) + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_dist/beta_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_dist/beta_dist_request_builder.py new file mode 100644 index 00000000000..4fdea2345f6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_dist/beta_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .beta_dist_post_request_body import Beta_DistPostRequestBody + +class Beta_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the beta_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Beta_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/beta_Dist", path_parameters) + + async def post(self,body: Beta_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action beta_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Beta_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action beta_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Beta_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Beta_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Beta_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Beta_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_inv/beta_inv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_inv/beta_inv_post_request_body.py new file mode 100644 index 00000000000..5aab48e9525 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_inv/beta_inv_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Beta_InvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The A property + a: Optional[Json] = None + # The alpha property + alpha: Optional[Json] = None + # The B property + b: Optional[Json] = None + # The beta property + beta: Optional[Json] = None + # The probability property + probability: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Beta_InvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Beta_InvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Beta_InvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "A": lambda n : setattr(self, 'a', n.get_object_value(Json)), + "alpha": lambda n : setattr(self, 'alpha', n.get_object_value(Json)), + "B": lambda n : setattr(self, 'b', n.get_object_value(Json)), + "beta": lambda n : setattr(self, 'beta', n.get_object_value(Json)), + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("A", self.a) + writer.write_object_value("alpha", self.alpha) + writer.write_object_value("B", self.b) + writer.write_object_value("beta", self.beta) + writer.write_object_value("probability", self.probability) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_inv/beta_inv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_inv/beta_inv_request_builder.py new file mode 100644 index 00000000000..8b02a38b681 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/beta_inv/beta_inv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .beta_inv_post_request_body import Beta_InvPostRequestBody + +class Beta_InvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the beta_Inv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Beta_InvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/beta_Inv", path_parameters) + + async def post(self,body: Beta_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action beta_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Beta_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action beta_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Beta_InvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Beta_InvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Beta_InvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Beta_InvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_dec/bin2_dec_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_dec/bin2_dec_post_request_body.py new file mode 100644 index 00000000000..09e04cc727c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_dec/bin2_dec_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Bin2DecPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Bin2DecPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Bin2DecPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Bin2DecPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.py new file mode 100644 index 00000000000..b3e07f30a01 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_dec/bin2_dec_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bin2_dec_post_request_body import Bin2DecPostRequestBody + +class Bin2DecRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the bin2Dec method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Bin2DecRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/bin2Dec", path_parameters) + + async def post(self,body: Bin2DecPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action bin2Dec + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Bin2DecPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action bin2Dec + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Bin2DecRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Bin2DecRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Bin2DecRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Bin2DecRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_hex/bin2_hex_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_hex/bin2_hex_post_request_body.py new file mode 100644 index 00000000000..acbf6bcec0a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_hex/bin2_hex_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Bin2HexPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The places property + places: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Bin2HexPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Bin2HexPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Bin2HexPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "places": lambda n : setattr(self, 'places', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("places", self.places) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.py new file mode 100644 index 00000000000..d11b2b886c7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_hex/bin2_hex_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bin2_hex_post_request_body import Bin2HexPostRequestBody + +class Bin2HexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the bin2Hex method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Bin2HexRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/bin2Hex", path_parameters) + + async def post(self,body: Bin2HexPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action bin2Hex + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Bin2HexPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action bin2Hex + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Bin2HexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Bin2HexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Bin2HexRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Bin2HexRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_oct/bin2_oct_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_oct/bin2_oct_post_request_body.py new file mode 100644 index 00000000000..5e696b5ff48 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_oct/bin2_oct_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Bin2OctPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The places property + places: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Bin2OctPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Bin2OctPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Bin2OctPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "places": lambda n : setattr(self, 'places', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("places", self.places) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.py new file mode 100644 index 00000000000..adffcafd219 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bin2_oct/bin2_oct_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bin2_oct_post_request_body import Bin2OctPostRequestBody + +class Bin2OctRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the bin2Oct method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Bin2OctRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/bin2Oct", path_parameters) + + async def post(self,body: Bin2OctPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action bin2Oct + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Bin2OctPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action bin2Oct + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Bin2OctRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Bin2OctRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Bin2OctRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Bin2OctRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist/binom_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist/binom_dist_post_request_body.py new file mode 100644 index 00000000000..64dc8c1c7d2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist/binom_dist_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Binom_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The numberS property + number_s: Optional[Json] = None + # The probabilityS property + probability_s: Optional[Json] = None + # The trials property + trials: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Binom_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Binom_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Binom_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "numberS": lambda n : setattr(self, 'number_s', n.get_object_value(Json)), + "probabilityS": lambda n : setattr(self, 'probability_s', n.get_object_value(Json)), + "trials": lambda n : setattr(self, 'trials', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("numberS", self.number_s) + writer.write_object_value("probabilityS", self.probability_s) + writer.write_object_value("trials", self.trials) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist/binom_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist/binom_dist_request_builder.py new file mode 100644 index 00000000000..e4c76d1c184 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist/binom_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .binom_dist_post_request_body import Binom_DistPostRequestBody + +class Binom_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the binom_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Binom_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/binom_Dist", path_parameters) + + async def post(self,body: Binom_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action binom_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Binom_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action binom_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Binom_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Binom_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Binom_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Binom_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist_range/binom_dist_range_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist_range/binom_dist_range_post_request_body.py new file mode 100644 index 00000000000..080d5fe58d5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist_range/binom_dist_range_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Binom_Dist_RangePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numberS property + number_s: Optional[Json] = None + # The numberS2 property + number_s2: Optional[Json] = None + # The probabilityS property + probability_s: Optional[Json] = None + # The trials property + trials: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Binom_Dist_RangePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Binom_Dist_RangePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Binom_Dist_RangePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numberS": lambda n : setattr(self, 'number_s', n.get_object_value(Json)), + "numberS2": lambda n : setattr(self, 'number_s2', n.get_object_value(Json)), + "probabilityS": lambda n : setattr(self, 'probability_s', n.get_object_value(Json)), + "trials": lambda n : setattr(self, 'trials', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numberS", self.number_s) + writer.write_object_value("numberS2", self.number_s2) + writer.write_object_value("probabilityS", self.probability_s) + writer.write_object_value("trials", self.trials) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.py new file mode 100644 index 00000000000..dc6294aaf0b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_dist_range/binom_dist_range_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .binom_dist_range_post_request_body import Binom_Dist_RangePostRequestBody + +class Binom_Dist_RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the binom_Dist_Range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Binom_Dist_RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/binom_Dist_Range", path_parameters) + + async def post(self,body: Binom_Dist_RangePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action binom_Dist_Range + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Binom_Dist_RangePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action binom_Dist_Range + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Binom_Dist_RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Binom_Dist_RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Binom_Dist_RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Binom_Dist_RangeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_inv/binom_inv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_inv/binom_inv_post_request_body.py new file mode 100644 index 00000000000..10bb1b532ed --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_inv/binom_inv_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Binom_InvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The alpha property + alpha: Optional[Json] = None + # The probabilityS property + probability_s: Optional[Json] = None + # The trials property + trials: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Binom_InvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Binom_InvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Binom_InvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "alpha": lambda n : setattr(self, 'alpha', n.get_object_value(Json)), + "probabilityS": lambda n : setattr(self, 'probability_s', n.get_object_value(Json)), + "trials": lambda n : setattr(self, 'trials', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("alpha", self.alpha) + writer.write_object_value("probabilityS", self.probability_s) + writer.write_object_value("trials", self.trials) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_inv/binom_inv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_inv/binom_inv_request_builder.py new file mode 100644 index 00000000000..d632852b4fc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/binom_inv/binom_inv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .binom_inv_post_request_body import Binom_InvPostRequestBody + +class Binom_InvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the binom_Inv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Binom_InvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/binom_Inv", path_parameters) + + async def post(self,body: Binom_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action binom_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Binom_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action binom_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Binom_InvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Binom_InvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Binom_InvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Binom_InvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitand/bitand_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitand/bitand_post_request_body.py new file mode 100644 index 00000000000..8b2bfe1daf1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitand/bitand_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BitandPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number1 property + number1: Optional[Json] = None + # The number2 property + number2: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BitandPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BitandPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BitandPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number1": lambda n : setattr(self, 'number1', n.get_object_value(Json)), + "number2": lambda n : setattr(self, 'number2', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number1", self.number1) + writer.write_object_value("number2", self.number2) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitand/bitand_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitand/bitand_request_builder.py new file mode 100644 index 00000000000..3f4accd3ef3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitand/bitand_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bitand_post_request_body import BitandPostRequestBody + +class BitandRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the bitand method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BitandRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/bitand", path_parameters) + + async def post(self,body: BitandPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action bitand + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BitandPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action bitand + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BitandRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BitandRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BitandRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class BitandRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitlshift/bitlshift_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitlshift/bitlshift_post_request_body.py new file mode 100644 index 00000000000..0e111f5a8ce --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitlshift/bitlshift_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BitlshiftPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The shiftAmount property + shift_amount: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BitlshiftPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BitlshiftPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BitlshiftPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "shiftAmount": lambda n : setattr(self, 'shift_amount', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("shiftAmount", self.shift_amount) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitlshift/bitlshift_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitlshift/bitlshift_request_builder.py new file mode 100644 index 00000000000..b5e68f0e2bb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitlshift/bitlshift_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bitlshift_post_request_body import BitlshiftPostRequestBody + +class BitlshiftRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the bitlshift method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BitlshiftRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/bitlshift", path_parameters) + + async def post(self,body: BitlshiftPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action bitlshift + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BitlshiftPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action bitlshift + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BitlshiftRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BitlshiftRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BitlshiftRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class BitlshiftRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitor/bitor_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitor/bitor_post_request_body.py new file mode 100644 index 00000000000..0b9753938f6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitor/bitor_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BitorPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number1 property + number1: Optional[Json] = None + # The number2 property + number2: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BitorPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BitorPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BitorPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number1": lambda n : setattr(self, 'number1', n.get_object_value(Json)), + "number2": lambda n : setattr(self, 'number2', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number1", self.number1) + writer.write_object_value("number2", self.number2) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitor/bitor_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitor/bitor_request_builder.py new file mode 100644 index 00000000000..a19d24a16f9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitor/bitor_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bitor_post_request_body import BitorPostRequestBody + +class BitorRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the bitor method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BitorRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/bitor", path_parameters) + + async def post(self,body: BitorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action bitor + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BitorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action bitor + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BitorRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BitorRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BitorRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class BitorRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitrshift/bitrshift_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitrshift/bitrshift_post_request_body.py new file mode 100644 index 00000000000..ffb4b7b7b53 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitrshift/bitrshift_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BitrshiftPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The shiftAmount property + shift_amount: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BitrshiftPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BitrshiftPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BitrshiftPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "shiftAmount": lambda n : setattr(self, 'shift_amount', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("shiftAmount", self.shift_amount) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitrshift/bitrshift_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitrshift/bitrshift_request_builder.py new file mode 100644 index 00000000000..cda8b91cca4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitrshift/bitrshift_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bitrshift_post_request_body import BitrshiftPostRequestBody + +class BitrshiftRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the bitrshift method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BitrshiftRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/bitrshift", path_parameters) + + async def post(self,body: BitrshiftPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action bitrshift + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BitrshiftPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action bitrshift + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BitrshiftRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BitrshiftRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BitrshiftRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class BitrshiftRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitxor/bitxor_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitxor/bitxor_post_request_body.py new file mode 100644 index 00000000000..4e47637c88c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitxor/bitxor_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class BitxorPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number1 property + number1: Optional[Json] = None + # The number2 property + number2: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> BitxorPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: BitxorPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return BitxorPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number1": lambda n : setattr(self, 'number1', n.get_object_value(Json)), + "number2": lambda n : setattr(self, 'number2', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number1", self.number1) + writer.write_object_value("number2", self.number2) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitxor/bitxor_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitxor/bitxor_request_builder.py new file mode 100644 index 00000000000..b133cab7cb3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/bitxor/bitxor_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .bitxor_post_request_body import BitxorPostRequestBody + +class BitxorRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the bitxor method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BitxorRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/bitxor", path_parameters) + + async def post(self,body: BitxorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action bitxor + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: BitxorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action bitxor + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> BitxorRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BitxorRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BitxorRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class BitxorRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_math/ceiling_math_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_math/ceiling_math_post_request_body.py new file mode 100644 index 00000000000..96e004677e0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_math/ceiling_math_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Ceiling_MathPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The mode property + mode: Optional[Json] = None + # The number property + number: Optional[Json] = None + # The significance property + significance: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Ceiling_MathPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Ceiling_MathPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Ceiling_MathPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "mode": lambda n : setattr(self, 'mode', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "significance": lambda n : setattr(self, 'significance', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("mode", self.mode) + writer.write_object_value("number", self.number) + writer.write_object_value("significance", self.significance) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.py new file mode 100644 index 00000000000..05fc04b78c0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_math/ceiling_math_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .ceiling_math_post_request_body import Ceiling_MathPostRequestBody + +class Ceiling_MathRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the ceiling_Math method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Ceiling_MathRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/ceiling_Math", path_parameters) + + async def post(self,body: Ceiling_MathPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action ceiling_Math + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Ceiling_MathPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action ceiling_Math + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Ceiling_MathRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Ceiling_MathRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Ceiling_MathRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Ceiling_MathRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_precise/ceiling_precise_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_precise/ceiling_precise_post_request_body.py new file mode 100644 index 00000000000..fb33d2d75e2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_precise/ceiling_precise_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Ceiling_PrecisePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The significance property + significance: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Ceiling_PrecisePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Ceiling_PrecisePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Ceiling_PrecisePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "significance": lambda n : setattr(self, 'significance', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("significance", self.significance) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.py new file mode 100644 index 00000000000..dc72044fa32 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ceiling_precise/ceiling_precise_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .ceiling_precise_post_request_body import Ceiling_PrecisePostRequestBody + +class Ceiling_PreciseRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the ceiling_Precise method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Ceiling_PreciseRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/ceiling_Precise", path_parameters) + + async def post(self,body: Ceiling_PrecisePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action ceiling_Precise + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Ceiling_PrecisePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action ceiling_Precise + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Ceiling_PreciseRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Ceiling_PreciseRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Ceiling_PreciseRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Ceiling_PreciseRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/char/char_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/char/char_post_request_body.py new file mode 100644 index 00000000000..1701d7976ec --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/char/char_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CharPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CharPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CharPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CharPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/char/char_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/char/char_request_builder.py new file mode 100644 index 00000000000..7f16b1d4185 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/char/char_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .char_post_request_body import CharPostRequestBody + +class CharRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the char method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CharRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/char", path_parameters) + + async def post(self,body: CharPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action char + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CharPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action char + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CharRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CharRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CharRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CharRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_post_request_body.py new file mode 100644 index 00000000000..b40cb1e8fe0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ChiSq_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The degFreedom property + deg_freedom: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ChiSq_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ChiSq_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ChiSq_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "degFreedom": lambda n : setattr(self, 'deg_freedom', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("degFreedom", self.deg_freedom) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.py new file mode 100644 index 00000000000..8ede0df28f5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist/chi_sq_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .chi_sq_dist_post_request_body import ChiSq_DistPostRequestBody + +class ChiSq_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the chiSq_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ChiSq_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/chiSq_Dist", path_parameters) + + async def post(self,body: ChiSq_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action chiSq_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ChiSq_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action chiSq_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ChiSq_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ChiSq_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ChiSq_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ChiSq_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_post_request_body.py new file mode 100644 index 00000000000..cf56f47911c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ChiSq_Dist_RTPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The degFreedom property + deg_freedom: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ChiSq_Dist_RTPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ChiSq_Dist_RTPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ChiSq_Dist_RTPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "degFreedom": lambda n : setattr(self, 'deg_freedom', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("degFreedom", self.deg_freedom) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.py new file mode 100644 index 00000000000..12d796cd8b9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_dist_r_t/chi_sq_dist_r_t_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .chi_sq_dist_r_t_post_request_body import ChiSq_Dist_RTPostRequestBody + +class ChiSq_Dist_RTRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the chiSq_Dist_RT method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ChiSq_Dist_RTRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/chiSq_Dist_RT", path_parameters) + + async def post(self,body: ChiSq_Dist_RTPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action chiSq_Dist_RT + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ChiSq_Dist_RTPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action chiSq_Dist_RT + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ChiSq_Dist_RTRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ChiSq_Dist_RTRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ChiSq_Dist_RTRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ChiSq_Dist_RTRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_post_request_body.py new file mode 100644 index 00000000000..720f5fc1718 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ChiSq_InvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The degFreedom property + deg_freedom: Optional[Json] = None + # The probability property + probability: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ChiSq_InvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ChiSq_InvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ChiSq_InvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "degFreedom": lambda n : setattr(self, 'deg_freedom', n.get_object_value(Json)), + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("degFreedom", self.deg_freedom) + writer.write_object_value("probability", self.probability) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.py new file mode 100644 index 00000000000..fd904f71d86 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv/chi_sq_inv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .chi_sq_inv_post_request_body import ChiSq_InvPostRequestBody + +class ChiSq_InvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the chiSq_Inv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ChiSq_InvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/chiSq_Inv", path_parameters) + + async def post(self,body: ChiSq_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action chiSq_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ChiSq_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action chiSq_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ChiSq_InvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ChiSq_InvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ChiSq_InvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ChiSq_InvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_post_request_body.py new file mode 100644 index 00000000000..66a06e21f01 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ChiSq_Inv_RTPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The degFreedom property + deg_freedom: Optional[Json] = None + # The probability property + probability: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ChiSq_Inv_RTPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ChiSq_Inv_RTPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ChiSq_Inv_RTPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "degFreedom": lambda n : setattr(self, 'deg_freedom', n.get_object_value(Json)), + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("degFreedom", self.deg_freedom) + writer.write_object_value("probability", self.probability) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.py new file mode 100644 index 00000000000..361fc991115 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/chi_sq_inv_r_t/chi_sq_inv_r_t_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .chi_sq_inv_r_t_post_request_body import ChiSq_Inv_RTPostRequestBody + +class ChiSq_Inv_RTRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the chiSq_Inv_RT method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ChiSq_Inv_RTRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/chiSq_Inv_RT", path_parameters) + + async def post(self,body: ChiSq_Inv_RTPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action chiSq_Inv_RT + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ChiSq_Inv_RTPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action chiSq_Inv_RT + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ChiSq_Inv_RTRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ChiSq_Inv_RTRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ChiSq_Inv_RTRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ChiSq_Inv_RTRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/choose/choose_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/choose/choose_post_request_body.py new file mode 100644 index 00000000000..b4130ee6e51 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/choose/choose_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ChoosePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The indexNum property + index_num: Optional[Json] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ChoosePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ChoosePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ChoosePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "indexNum": lambda n : setattr(self, 'index_num', n.get_object_value(Json)), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("indexNum", self.index_num) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/choose/choose_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/choose/choose_request_builder.py new file mode 100644 index 00000000000..7aed29b20cd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/choose/choose_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .choose_post_request_body import ChoosePostRequestBody + +class ChooseRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the choose method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ChooseRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/choose", path_parameters) + + async def post(self,body: ChoosePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action choose + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ChoosePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action choose + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ChooseRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ChooseRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ChooseRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ChooseRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/clean/clean_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/clean/clean_post_request_body.py new file mode 100644 index 00000000000..7ab479c15d1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/clean/clean_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CleanPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CleanPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CleanPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CleanPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/clean/clean_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/clean/clean_request_builder.py new file mode 100644 index 00000000000..86a9839e1d4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/clean/clean_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .clean_post_request_body import CleanPostRequestBody + +class CleanRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clean method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CleanRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/clean", path_parameters) + + async def post(self,body: CleanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action clean + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CleanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action clean + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CleanRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CleanRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CleanRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CleanRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/code/code_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/code/code_post_request_body.py new file mode 100644 index 00000000000..6d09be03188 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/code/code_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CodePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CodePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CodePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CodePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/code/code_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/code/code_request_builder.py new file mode 100644 index 00000000000..5b8bae70003 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/code/code_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .code_post_request_body import CodePostRequestBody + +class CodeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the code method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CodeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/code", path_parameters) + + async def post(self,body: CodePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action code + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CodePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action code + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CodeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CodeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CodeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CodeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/columns/columns_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/columns/columns_post_request_body.py new file mode 100644 index 00000000000..0981f5ce17a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/columns/columns_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ColumnsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ColumnsPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ColumnsPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ColumnsPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/columns/columns_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/columns/columns_request_builder.py new file mode 100644 index 00000000000..803a48ba1b3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/columns/columns_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .columns_post_request_body import ColumnsPostRequestBody + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the columns method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/columns", path_parameters) + + async def post(self,body: ColumnsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action columns + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ColumnsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action columns + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combin/combin_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combin/combin_post_request_body.py new file mode 100644 index 00000000000..ba2c6abe933 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combin/combin_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CombinPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The numberChosen property + number_chosen: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CombinPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CombinPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CombinPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "numberChosen": lambda n : setattr(self, 'number_chosen', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("numberChosen", self.number_chosen) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combin/combin_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combin/combin_request_builder.py new file mode 100644 index 00000000000..5d7633d4605 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combin/combin_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .combin_post_request_body import CombinPostRequestBody + +class CombinRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the combin method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CombinRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/combin", path_parameters) + + async def post(self,body: CombinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action combin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CombinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action combin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CombinRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CombinRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CombinRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CombinRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combina/combina_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combina/combina_post_request_body.py new file mode 100644 index 00000000000..250834f8022 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combina/combina_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CombinaPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The numberChosen property + number_chosen: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CombinaPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CombinaPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CombinaPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "numberChosen": lambda n : setattr(self, 'number_chosen', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("numberChosen", self.number_chosen) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combina/combina_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combina/combina_request_builder.py new file mode 100644 index 00000000000..aeb395ae8c6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/combina/combina_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .combina_post_request_body import CombinaPostRequestBody + +class CombinaRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the combina method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CombinaRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/combina", path_parameters) + + async def post(self,body: CombinaPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action combina + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CombinaPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action combina + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CombinaRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CombinaRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CombinaRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CombinaRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/complex/complex_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/complex/complex_post_request_body.py new file mode 100644 index 00000000000..3ff07b95cae --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/complex/complex_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ComplexPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The iNum property + i_num: Optional[Json] = None + # The realNum property + real_num: Optional[Json] = None + # The suffix property + suffix: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ComplexPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ComplexPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ComplexPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "iNum": lambda n : setattr(self, 'i_num', n.get_object_value(Json)), + "realNum": lambda n : setattr(self, 'real_num', n.get_object_value(Json)), + "suffix": lambda n : setattr(self, 'suffix', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("iNum", self.i_num) + writer.write_object_value("realNum", self.real_num) + writer.write_object_value("suffix", self.suffix) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/complex/complex_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/complex/complex_request_builder.py new file mode 100644 index 00000000000..1441f280ab5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/complex/complex_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .complex_post_request_body import ComplexPostRequestBody + +class ComplexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the complex method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ComplexRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/complex", path_parameters) + + async def post(self,body: ComplexPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action complex + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ComplexPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action complex + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ComplexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ComplexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ComplexRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ComplexRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/concatenate/concatenate_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/concatenate/concatenate_post_request_body.py new file mode 100644 index 00000000000..88024de1821 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/concatenate/concatenate_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ConcatenatePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ConcatenatePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ConcatenatePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ConcatenatePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/concatenate/concatenate_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/concatenate/concatenate_request_builder.py new file mode 100644 index 00000000000..e11f64f8aa1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/concatenate/concatenate_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .concatenate_post_request_body import ConcatenatePostRequestBody + +class ConcatenateRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the concatenate method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ConcatenateRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/concatenate", path_parameters) + + async def post(self,body: ConcatenatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action concatenate + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ConcatenatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action concatenate + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ConcatenateRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ConcatenateRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ConcatenateRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ConcatenateRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_norm/confidence_norm_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_norm/confidence_norm_post_request_body.py new file mode 100644 index 00000000000..a1d6dd91290 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_norm/confidence_norm_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Confidence_NormPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The alpha property + alpha: Optional[Json] = None + # The size property + size: Optional[Json] = None + # The standardDev property + standard_dev: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Confidence_NormPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Confidence_NormPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Confidence_NormPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "alpha": lambda n : setattr(self, 'alpha', n.get_object_value(Json)), + "size": lambda n : setattr(self, 'size', n.get_object_value(Json)), + "standardDev": lambda n : setattr(self, 'standard_dev', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("alpha", self.alpha) + writer.write_object_value("size", self.size) + writer.write_object_value("standardDev", self.standard_dev) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.py new file mode 100644 index 00000000000..c5cb51e130a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_norm/confidence_norm_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .confidence_norm_post_request_body import Confidence_NormPostRequestBody + +class Confidence_NormRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the confidence_Norm method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Confidence_NormRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/confidence_Norm", path_parameters) + + async def post(self,body: Confidence_NormPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action confidence_Norm + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Confidence_NormPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action confidence_Norm + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Confidence_NormRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Confidence_NormRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Confidence_NormRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Confidence_NormRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_t/confidence_t_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_t/confidence_t_post_request_body.py new file mode 100644 index 00000000000..8bdd0139b9c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_t/confidence_t_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Confidence_TPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The alpha property + alpha: Optional[Json] = None + # The size property + size: Optional[Json] = None + # The standardDev property + standard_dev: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Confidence_TPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Confidence_TPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Confidence_TPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "alpha": lambda n : setattr(self, 'alpha', n.get_object_value(Json)), + "size": lambda n : setattr(self, 'size', n.get_object_value(Json)), + "standardDev": lambda n : setattr(self, 'standard_dev', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("alpha", self.alpha) + writer.write_object_value("size", self.size) + writer.write_object_value("standardDev", self.standard_dev) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_t/confidence_t_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_t/confidence_t_request_builder.py new file mode 100644 index 00000000000..0f4e0246b3f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/confidence_t/confidence_t_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .confidence_t_post_request_body import Confidence_TPostRequestBody + +class Confidence_TRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the confidence_T method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Confidence_TRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/confidence_T", path_parameters) + + async def post(self,body: Confidence_TPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action confidence_T + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Confidence_TPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action confidence_T + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Confidence_TRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Confidence_TRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Confidence_TRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Confidence_TRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/convert/convert_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/convert/convert_post_request_body.py new file mode 100644 index 00000000000..dc04dcd31ec --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/convert/convert_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ConvertPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fromUnit property + from_unit: Optional[Json] = None + # The number property + number: Optional[Json] = None + # The toUnit property + to_unit: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ConvertPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ConvertPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ConvertPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "fromUnit": lambda n : setattr(self, 'from_unit', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "toUnit": lambda n : setattr(self, 'to_unit', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fromUnit", self.from_unit) + writer.write_object_value("number", self.number) + writer.write_object_value("toUnit", self.to_unit) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/convert/convert_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/convert/convert_request_builder.py new file mode 100644 index 00000000000..9e70ac9128a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/convert/convert_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .convert_post_request_body import ConvertPostRequestBody + +class ConvertRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the convert method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ConvertRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/convert", path_parameters) + + async def post(self,body: ConvertPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action convert + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ConvertPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action convert + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ConvertRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ConvertRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ConvertRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ConvertRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cos/cos_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cos/cos_post_request_body.py new file mode 100644 index 00000000000..48bd6500196 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cos/cos_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CosPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CosPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CosPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CosPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cos/cos_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cos/cos_request_builder.py new file mode 100644 index 00000000000..0ccd92385da --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cos/cos_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .cos_post_request_body import CosPostRequestBody + +class CosRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the cos method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CosRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/cos", path_parameters) + + async def post(self,body: CosPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action cos + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CosPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action cos + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CosRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CosRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CosRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CosRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cosh/cosh_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cosh/cosh_post_request_body.py new file mode 100644 index 00000000000..b2fe6b583dc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cosh/cosh_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CoshPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CoshPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CoshPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CoshPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cosh/cosh_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cosh/cosh_request_builder.py new file mode 100644 index 00000000000..62f4d53d8a8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cosh/cosh_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .cosh_post_request_body import CoshPostRequestBody + +class CoshRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the cosh method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CoshRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/cosh", path_parameters) + + async def post(self,body: CoshPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action cosh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CoshPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action cosh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CoshRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CoshRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CoshRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CoshRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cot/cot_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cot/cot_post_request_body.py new file mode 100644 index 00000000000..cbfc95e270d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cot/cot_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CotPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CotPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CotPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CotPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cot/cot_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cot/cot_request_builder.py new file mode 100644 index 00000000000..53d9d9161d3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cot/cot_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .cot_post_request_body import CotPostRequestBody + +class CotRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the cot method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CotRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/cot", path_parameters) + + async def post(self,body: CotPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action cot + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CotPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action cot + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CotRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CotRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CotRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CotRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coth/coth_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coth/coth_post_request_body.py new file mode 100644 index 00000000000..06e6c4525e4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coth/coth_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CothPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CothPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CothPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CothPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coth/coth_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coth/coth_request_builder.py new file mode 100644 index 00000000000..89944491c57 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coth/coth_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .coth_post_request_body import CothPostRequestBody + +class CothRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the coth method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CothRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/coth", path_parameters) + + async def post(self,body: CothPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action coth + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CothPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action coth + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CothRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CothRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CothRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CothRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count/count_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count/count_post_request_body.py new file mode 100644 index 00000000000..24c8932a407 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count/count_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CountPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count/count_request_builder.py new file mode 100644 index 00000000000..9699ac21f1c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count/count_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .count_post_request_body import CountPostRequestBody + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the count method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/count", path_parameters) + + async def post(self,body: CountPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action count + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CountPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action count + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_a/count_a_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_a/count_a_post_request_body.py new file mode 100644 index 00000000000..6d88be3e857 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_a/count_a_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CountAPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountAPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountAPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountAPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_a/count_a_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_a/count_a_request_builder.py new file mode 100644 index 00000000000..57ce999e3ba --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_a/count_a_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .count_a_post_request_body import CountAPostRequestBody + +class CountARequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the countA method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountARequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/countA", path_parameters) + + async def post(self,body: CountAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action countA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CountAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action countA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CountARequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountARequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountARequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountARequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_blank/count_blank_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_blank/count_blank_post_request_body.py new file mode 100644 index 00000000000..d4f32bb88fc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_blank/count_blank_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CountBlankPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The range property + range: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountBlankPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountBlankPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountBlankPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "range": lambda n : setattr(self, 'range', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("range", self.range) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_blank/count_blank_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_blank/count_blank_request_builder.py new file mode 100644 index 00000000000..92db621cdde --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_blank/count_blank_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .count_blank_post_request_body import CountBlankPostRequestBody + +class CountBlankRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the countBlank method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountBlankRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/countBlank", path_parameters) + + async def post(self,body: CountBlankPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action countBlank + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CountBlankPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action countBlank + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CountBlankRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountBlankRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountBlankRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountBlankRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_if/count_if_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_if/count_if_post_request_body.py new file mode 100644 index 00000000000..3f413867509 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_if/count_if_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CountIfPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The range property + range: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountIfPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountIfPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountIfPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "range": lambda n : setattr(self, 'range', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("range", self.range) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_if/count_if_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_if/count_if_request_builder.py new file mode 100644 index 00000000000..1f91f23672b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_if/count_if_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .count_if_post_request_body import CountIfPostRequestBody + +class CountIfRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the countIf method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountIfRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/countIf", path_parameters) + + async def post(self,body: CountIfPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action countIf + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CountIfPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action countIf + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CountIfRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountIfRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountIfRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountIfRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_ifs/count_ifs_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_ifs/count_ifs_post_request_body.py new file mode 100644 index 00000000000..b33f35b914e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_ifs/count_ifs_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CountIfsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountIfsPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountIfsPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountIfsPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_ifs/count_ifs_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_ifs/count_ifs_request_builder.py new file mode 100644 index 00000000000..a0f3054dfae --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/count_ifs/count_ifs_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .count_ifs_post_request_body import CountIfsPostRequestBody + +class CountIfsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the countIfs method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountIfsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/countIfs", path_parameters) + + async def post(self,body: CountIfsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action countIfs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CountIfsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action countIfs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CountIfsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountIfsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountIfsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountIfsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_day_bs/coup_day_bs_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_day_bs/coup_day_bs_post_request_body.py new file mode 100644 index 00000000000..741b61a133d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_day_bs/coup_day_bs_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CoupDayBsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CoupDayBsPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CoupDayBsPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CoupDayBsPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.py new file mode 100644 index 00000000000..477dbecc51a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_day_bs/coup_day_bs_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .coup_day_bs_post_request_body import CoupDayBsPostRequestBody + +class CoupDayBsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the coupDayBs method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CoupDayBsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/coupDayBs", path_parameters) + + async def post(self,body: CoupDayBsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action coupDayBs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CoupDayBsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action coupDayBs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CoupDayBsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CoupDayBsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CoupDayBsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CoupDayBsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days/coup_days_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days/coup_days_post_request_body.py new file mode 100644 index 00000000000..61d34449b4e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days/coup_days_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CoupDaysPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CoupDaysPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CoupDaysPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CoupDaysPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days/coup_days_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days/coup_days_request_builder.py new file mode 100644 index 00000000000..f0ecd5979d8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days/coup_days_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .coup_days_post_request_body import CoupDaysPostRequestBody + +class CoupDaysRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the coupDays method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CoupDaysRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/coupDays", path_parameters) + + async def post(self,body: CoupDaysPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action coupDays + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CoupDaysPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action coupDays + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CoupDaysRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CoupDaysRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CoupDaysRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CoupDaysRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days_nc/coup_days_nc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days_nc/coup_days_nc_post_request_body.py new file mode 100644 index 00000000000..7a6e15decba --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days_nc/coup_days_nc_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CoupDaysNcPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CoupDaysNcPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CoupDaysNcPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CoupDaysNcPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.py new file mode 100644 index 00000000000..cdbae831258 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_days_nc/coup_days_nc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .coup_days_nc_post_request_body import CoupDaysNcPostRequestBody + +class CoupDaysNcRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the coupDaysNc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CoupDaysNcRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/coupDaysNc", path_parameters) + + async def post(self,body: CoupDaysNcPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action coupDaysNc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CoupDaysNcPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action coupDaysNc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CoupDaysNcRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CoupDaysNcRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CoupDaysNcRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CoupDaysNcRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_ncd/coup_ncd_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_ncd/coup_ncd_post_request_body.py new file mode 100644 index 00000000000..23ca1064064 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_ncd/coup_ncd_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CoupNcdPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CoupNcdPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CoupNcdPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CoupNcdPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.py new file mode 100644 index 00000000000..7bef020a048 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_ncd/coup_ncd_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .coup_ncd_post_request_body import CoupNcdPostRequestBody + +class CoupNcdRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the coupNcd method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CoupNcdRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/coupNcd", path_parameters) + + async def post(self,body: CoupNcdPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action coupNcd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CoupNcdPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action coupNcd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CoupNcdRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CoupNcdRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CoupNcdRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CoupNcdRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_num/coup_num_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_num/coup_num_post_request_body.py new file mode 100644 index 00000000000..08672120b7e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_num/coup_num_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CoupNumPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CoupNumPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CoupNumPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CoupNumPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_num/coup_num_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_num/coup_num_request_builder.py new file mode 100644 index 00000000000..bdff2b36575 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_num/coup_num_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .coup_num_post_request_body import CoupNumPostRequestBody + +class CoupNumRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the coupNum method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CoupNumRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/coupNum", path_parameters) + + async def post(self,body: CoupNumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action coupNum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CoupNumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action coupNum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CoupNumRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CoupNumRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CoupNumRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CoupNumRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_pcd/coup_pcd_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_pcd/coup_pcd_post_request_body.py new file mode 100644 index 00000000000..3b80060c1d5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_pcd/coup_pcd_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CoupPcdPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CoupPcdPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CoupPcdPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CoupPcdPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.py new file mode 100644 index 00000000000..330f14b7b7f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/coup_pcd/coup_pcd_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .coup_pcd_post_request_body import CoupPcdPostRequestBody + +class CoupPcdRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the coupPcd method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CoupPcdRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/coupPcd", path_parameters) + + async def post(self,body: CoupPcdPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action coupPcd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CoupPcdPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action coupPcd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CoupPcdRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CoupPcdRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CoupPcdRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CoupPcdRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csc/csc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csc/csc_post_request_body.py new file mode 100644 index 00000000000..479bdcebe75 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csc/csc_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CscPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CscPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CscPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CscPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csc/csc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csc/csc_request_builder.py new file mode 100644 index 00000000000..7d9a5e267ea --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csc/csc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .csc_post_request_body import CscPostRequestBody + +class CscRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the csc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CscRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/csc", path_parameters) + + async def post(self,body: CscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action csc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action csc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CscRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CscRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CscRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CscRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csch/csch_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csch/csch_post_request_body.py new file mode 100644 index 00000000000..5a7dbca0e05 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csch/csch_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CschPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CschPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CschPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CschPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csch/csch_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csch/csch_request_builder.py new file mode 100644 index 00000000000..e0b71dad15a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/csch/csch_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .csch_post_request_body import CschPostRequestBody + +class CschRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the csch method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CschRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/csch", path_parameters) + + async def post(self,body: CschPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action csch + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CschPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action csch + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CschRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CschRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CschRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CschRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_post_request_body.py new file mode 100644 index 00000000000..8a100531319 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_post_request_body.py @@ -0,0 +1,76 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CumIPmtPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The endPeriod property + end_period: Optional[Json] = None + # The nper property + nper: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The startPeriod property + start_period: Optional[Json] = None + # The type property + type: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CumIPmtPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CumIPmtPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CumIPmtPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "endPeriod": lambda n : setattr(self, 'end_period', n.get_object_value(Json)), + "nper": lambda n : setattr(self, 'nper', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "startPeriod": lambda n : setattr(self, 'start_period', n.get_object_value(Json)), + "type": lambda n : setattr(self, 'type', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("endPeriod", self.end_period) + writer.write_object_value("nper", self.nper) + writer.write_object_value("pv", self.pv) + writer.write_object_value("rate", self.rate) + writer.write_object_value("startPeriod", self.start_period) + writer.write_object_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.py new file mode 100644 index 00000000000..3ee45122381 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_i_pmt/cum_i_pmt_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .cum_i_pmt_post_request_body import CumIPmtPostRequestBody + +class CumIPmtRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the cumIPmt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CumIPmtRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/cumIPmt", path_parameters) + + async def post(self,body: CumIPmtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action cumIPmt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CumIPmtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action cumIPmt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CumIPmtRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CumIPmtRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CumIPmtRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CumIPmtRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_princ/cum_princ_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_princ/cum_princ_post_request_body.py new file mode 100644 index 00000000000..28123c0ceb6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_princ/cum_princ_post_request_body.py @@ -0,0 +1,76 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class CumPrincPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The endPeriod property + end_period: Optional[Json] = None + # The nper property + nper: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The startPeriod property + start_period: Optional[Json] = None + # The type property + type: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CumPrincPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CumPrincPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CumPrincPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "endPeriod": lambda n : setattr(self, 'end_period', n.get_object_value(Json)), + "nper": lambda n : setattr(self, 'nper', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "startPeriod": lambda n : setattr(self, 'start_period', n.get_object_value(Json)), + "type": lambda n : setattr(self, 'type', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("endPeriod", self.end_period) + writer.write_object_value("nper", self.nper) + writer.write_object_value("pv", self.pv) + writer.write_object_value("rate", self.rate) + writer.write_object_value("startPeriod", self.start_period) + writer.write_object_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_princ/cum_princ_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_princ/cum_princ_request_builder.py new file mode 100644 index 00000000000..02329cb5316 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/cum_princ/cum_princ_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .cum_princ_post_request_body import CumPrincPostRequestBody + +class CumPrincRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the cumPrinc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CumPrincRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/cumPrinc", path_parameters) + + async def post(self,body: CumPrincPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action cumPrinc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: CumPrincPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action cumPrinc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CumPrincRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CumPrincRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CumPrincRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CumPrincRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/date/date_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/date/date_post_request_body.py new file mode 100644 index 00000000000..0b86c02daea --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/date/date_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DatePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The day property + day: Optional[Json] = None + # The month property + month: Optional[Json] = None + # The year property + year: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DatePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DatePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DatePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "day": lambda n : setattr(self, 'day', n.get_object_value(Json)), + "month": lambda n : setattr(self, 'month', n.get_object_value(Json)), + "year": lambda n : setattr(self, 'year', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("day", self.day) + writer.write_object_value("month", self.month) + writer.write_object_value("year", self.year) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/date/date_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/date/date_request_builder.py new file mode 100644 index 00000000000..17396afefad --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/date/date_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .date_post_request_body import DatePostRequestBody + +class DateRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the date method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DateRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/date", path_parameters) + + async def post(self,body: DatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action date + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action date + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DateRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DateRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DateRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DateRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/datevalue/datevalue_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/datevalue/datevalue_post_request_body.py new file mode 100644 index 00000000000..aff5c37a74a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/datevalue/datevalue_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DatevaluePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The dateText property + date_text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DatevaluePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DatevaluePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DatevaluePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "dateText": lambda n : setattr(self, 'date_text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("dateText", self.date_text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/datevalue/datevalue_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/datevalue/datevalue_request_builder.py new file mode 100644 index 00000000000..95d24f7bbd0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/datevalue/datevalue_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .datevalue_post_request_body import DatevaluePostRequestBody + +class DatevalueRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the datevalue method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DatevalueRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/datevalue", path_parameters) + + async def post(self,body: DatevaluePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action datevalue + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DatevaluePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action datevalue + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DatevalueRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DatevalueRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DatevalueRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DatevalueRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/daverage/daverage_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/daverage/daverage_post_request_body.py new file mode 100644 index 00000000000..df1efed111f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/daverage/daverage_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DaveragePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DaveragePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DaveragePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DaveragePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/daverage/daverage_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/daverage/daverage_request_builder.py new file mode 100644 index 00000000000..40801927b5b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/daverage/daverage_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .daverage_post_request_body import DaveragePostRequestBody + +class DaverageRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the daverage method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DaverageRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/daverage", path_parameters) + + async def post(self,body: DaveragePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action daverage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DaveragePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action daverage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DaverageRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DaverageRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DaverageRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DaverageRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/day/day_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/day/day_post_request_body.py new file mode 100644 index 00000000000..d0a4e17f781 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/day/day_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DayPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The serialNumber property + serial_number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DayPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DayPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DayPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "serialNumber": lambda n : setattr(self, 'serial_number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("serialNumber", self.serial_number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/day/day_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/day/day_request_builder.py new file mode 100644 index 00000000000..9f2b5650a92 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/day/day_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .day_post_request_body import DayPostRequestBody + +class DayRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the day method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DayRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/day", path_parameters) + + async def post(self,body: DayPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action day + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DayPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action day + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DayRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DayRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DayRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DayRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days/days_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days/days_post_request_body.py new file mode 100644 index 00000000000..79af52615c5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days/days_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DaysPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The endDate property + end_date: Optional[Json] = None + # The startDate property + start_date: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DaysPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DaysPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DaysPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "endDate": lambda n : setattr(self, 'end_date', n.get_object_value(Json)), + "startDate": lambda n : setattr(self, 'start_date', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("endDate", self.end_date) + writer.write_object_value("startDate", self.start_date) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days/days_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days/days_request_builder.py new file mode 100644 index 00000000000..6b6fd111be0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days/days_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .days_post_request_body import DaysPostRequestBody + +class DaysRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the days method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DaysRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/days", path_parameters) + + async def post(self,body: DaysPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action days + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DaysPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action days + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DaysRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DaysRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DaysRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DaysRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days360/days360_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days360/days360_post_request_body.py new file mode 100644 index 00000000000..f3d2806e701 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days360/days360_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Days360PostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The endDate property + end_date: Optional[Json] = None + # The method property + method: Optional[Json] = None + # The startDate property + start_date: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Days360PostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Days360PostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Days360PostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "endDate": lambda n : setattr(self, 'end_date', n.get_object_value(Json)), + "method": lambda n : setattr(self, 'method', n.get_object_value(Json)), + "startDate": lambda n : setattr(self, 'start_date', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("endDate", self.end_date) + writer.write_object_value("method", self.method) + writer.write_object_value("startDate", self.start_date) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days360/days360_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days360/days360_request_builder.py new file mode 100644 index 00000000000..0a8dbe1f164 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/days360/days360_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .days360_post_request_body import Days360PostRequestBody + +class Days360RequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the days360 method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Days360RequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/days360", path_parameters) + + async def post(self,body: Days360PostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action days360 + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Days360PostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action days360 + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Days360RequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Days360RequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Days360RequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Days360RequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/db/db_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/db/db_post_request_body.py new file mode 100644 index 00000000000..a80c2d044ce --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/db/db_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DbPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cost property + cost: Optional[Json] = None + # The life property + life: Optional[Json] = None + # The month property + month: Optional[Json] = None + # The period property + period: Optional[Json] = None + # The salvage property + salvage: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DbPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DbPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DbPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cost": lambda n : setattr(self, 'cost', n.get_object_value(Json)), + "life": lambda n : setattr(self, 'life', n.get_object_value(Json)), + "month": lambda n : setattr(self, 'month', n.get_object_value(Json)), + "period": lambda n : setattr(self, 'period', n.get_object_value(Json)), + "salvage": lambda n : setattr(self, 'salvage', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cost", self.cost) + writer.write_object_value("life", self.life) + writer.write_object_value("month", self.month) + writer.write_object_value("period", self.period) + writer.write_object_value("salvage", self.salvage) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/db/db_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/db/db_request_builder.py new file mode 100644 index 00000000000..8ff507154d2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/db/db_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .db_post_request_body import DbPostRequestBody + +class DbRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the db method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DbRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/db", path_parameters) + + async def post(self,body: DbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action db + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action db + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DbRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DbRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DbRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DbRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dbcs/dbcs_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dbcs/dbcs_post_request_body.py new file mode 100644 index 00000000000..d003157314e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dbcs/dbcs_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DbcsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DbcsPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DbcsPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DbcsPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dbcs/dbcs_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dbcs/dbcs_request_builder.py new file mode 100644 index 00000000000..3b750f3afce --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dbcs/dbcs_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dbcs_post_request_body import DbcsPostRequestBody + +class DbcsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dbcs method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DbcsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dbcs", path_parameters) + + async def post(self,body: DbcsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dbcs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DbcsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dbcs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DbcsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DbcsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DbcsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DbcsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount/dcount_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount/dcount_post_request_body.py new file mode 100644 index 00000000000..583405134d3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount/dcount_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DcountPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DcountPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DcountPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DcountPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount/dcount_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount/dcount_request_builder.py new file mode 100644 index 00000000000..8441dec7f4b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount/dcount_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dcount_post_request_body import DcountPostRequestBody + +class DcountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dcount method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DcountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dcount", path_parameters) + + async def post(self,body: DcountPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dcount + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DcountPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dcount + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DcountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DcountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DcountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DcountRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount_a/dcount_a_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount_a/dcount_a_post_request_body.py new file mode 100644 index 00000000000..77c73878217 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount_a/dcount_a_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DcountAPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DcountAPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DcountAPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DcountAPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount_a/dcount_a_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount_a/dcount_a_request_builder.py new file mode 100644 index 00000000000..e927316d341 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dcount_a/dcount_a_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dcount_a_post_request_body import DcountAPostRequestBody + +class DcountARequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dcountA method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DcountARequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dcountA", path_parameters) + + async def post(self,body: DcountAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dcountA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DcountAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dcountA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DcountARequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DcountARequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DcountARequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DcountARequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ddb/ddb_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ddb/ddb_post_request_body.py new file mode 100644 index 00000000000..09e5b10ea20 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ddb/ddb_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DdbPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cost property + cost: Optional[Json] = None + # The factor property + factor: Optional[Json] = None + # The life property + life: Optional[Json] = None + # The period property + period: Optional[Json] = None + # The salvage property + salvage: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DdbPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DdbPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DdbPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cost": lambda n : setattr(self, 'cost', n.get_object_value(Json)), + "factor": lambda n : setattr(self, 'factor', n.get_object_value(Json)), + "life": lambda n : setattr(self, 'life', n.get_object_value(Json)), + "period": lambda n : setattr(self, 'period', n.get_object_value(Json)), + "salvage": lambda n : setattr(self, 'salvage', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cost", self.cost) + writer.write_object_value("factor", self.factor) + writer.write_object_value("life", self.life) + writer.write_object_value("period", self.period) + writer.write_object_value("salvage", self.salvage) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ddb/ddb_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ddb/ddb_request_builder.py new file mode 100644 index 00000000000..d0e64d6308e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ddb/ddb_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .ddb_post_request_body import DdbPostRequestBody + +class DdbRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the ddb method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DdbRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/ddb", path_parameters) + + async def post(self,body: DdbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action ddb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DdbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action ddb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DdbRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DdbRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DdbRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DdbRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_bin/dec2_bin_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_bin/dec2_bin_post_request_body.py new file mode 100644 index 00000000000..c4e15dac57a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_bin/dec2_bin_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Dec2BinPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The places property + places: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Dec2BinPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Dec2BinPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Dec2BinPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "places": lambda n : setattr(self, 'places', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("places", self.places) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.py new file mode 100644 index 00000000000..f9e5d84822f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_bin/dec2_bin_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dec2_bin_post_request_body import Dec2BinPostRequestBody + +class Dec2BinRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dec2Bin method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Dec2BinRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dec2Bin", path_parameters) + + async def post(self,body: Dec2BinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dec2Bin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Dec2BinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dec2Bin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Dec2BinRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Dec2BinRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Dec2BinRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Dec2BinRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_hex/dec2_hex_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_hex/dec2_hex_post_request_body.py new file mode 100644 index 00000000000..7d471bbe437 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_hex/dec2_hex_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Dec2HexPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The places property + places: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Dec2HexPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Dec2HexPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Dec2HexPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "places": lambda n : setattr(self, 'places', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("places", self.places) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.py new file mode 100644 index 00000000000..acc6466e7e4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_hex/dec2_hex_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dec2_hex_post_request_body import Dec2HexPostRequestBody + +class Dec2HexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dec2Hex method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Dec2HexRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dec2Hex", path_parameters) + + async def post(self,body: Dec2HexPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dec2Hex + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Dec2HexPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dec2Hex + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Dec2HexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Dec2HexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Dec2HexRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Dec2HexRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_oct/dec2_oct_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_oct/dec2_oct_post_request_body.py new file mode 100644 index 00000000000..9ee16fd58cb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_oct/dec2_oct_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Dec2OctPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The places property + places: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Dec2OctPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Dec2OctPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Dec2OctPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "places": lambda n : setattr(self, 'places', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("places", self.places) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.py new file mode 100644 index 00000000000..294366fe0cd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dec2_oct/dec2_oct_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dec2_oct_post_request_body import Dec2OctPostRequestBody + +class Dec2OctRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dec2Oct method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Dec2OctRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dec2Oct", path_parameters) + + async def post(self,body: Dec2OctPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dec2Oct + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Dec2OctPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dec2Oct + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Dec2OctRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Dec2OctRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Dec2OctRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Dec2OctRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/decimal/decimal_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/decimal/decimal_post_request_body.py new file mode 100644 index 00000000000..2902c5dfea8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/decimal/decimal_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DecimalPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The radix property + radix: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DecimalPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DecimalPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DecimalPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "radix": lambda n : setattr(self, 'radix', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("radix", self.radix) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/decimal/decimal_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/decimal/decimal_request_builder.py new file mode 100644 index 00000000000..3723b4dfaf7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/decimal/decimal_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .decimal_post_request_body import DecimalPostRequestBody + +class DecimalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the decimal method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DecimalRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/decimal", path_parameters) + + async def post(self,body: DecimalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action decimal + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DecimalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action decimal + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DecimalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DecimalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DecimalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DecimalRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/degrees/degrees_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/degrees/degrees_post_request_body.py new file mode 100644 index 00000000000..5419d254eb5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/degrees/degrees_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DegreesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The angle property + angle: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DegreesPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DegreesPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DegreesPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "angle": lambda n : setattr(self, 'angle', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("angle", self.angle) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/degrees/degrees_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/degrees/degrees_request_builder.py new file mode 100644 index 00000000000..1aeaa992d4f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/degrees/degrees_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .degrees_post_request_body import DegreesPostRequestBody + +class DegreesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the degrees method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DegreesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/degrees", path_parameters) + + async def post(self,body: DegreesPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action degrees + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DegreesPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action degrees + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DegreesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DegreesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DegreesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DegreesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/delta/delta_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/delta/delta_post_request_body.py new file mode 100644 index 00000000000..d4d5761bc20 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/delta/delta_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DeltaPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number1 property + number1: Optional[Json] = None + # The number2 property + number2: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DeltaPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DeltaPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DeltaPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number1": lambda n : setattr(self, 'number1', n.get_object_value(Json)), + "number2": lambda n : setattr(self, 'number2', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number1", self.number1) + writer.write_object_value("number2", self.number2) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/delta/delta_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/delta/delta_request_builder.py new file mode 100644 index 00000000000..c6f1c939b86 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/delta/delta_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .delta_post_request_body import DeltaPostRequestBody + +class DeltaRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the delta method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DeltaRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/delta", path_parameters) + + async def post(self,body: DeltaPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action delta + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DeltaPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action delta + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DeltaRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DeltaRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DeltaRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DeltaRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dev_sq/dev_sq_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dev_sq/dev_sq_post_request_body.py new file mode 100644 index 00000000000..12c10a255a7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dev_sq/dev_sq_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DevSqPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DevSqPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DevSqPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DevSqPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dev_sq/dev_sq_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dev_sq/dev_sq_request_builder.py new file mode 100644 index 00000000000..2a7328b4a88 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dev_sq/dev_sq_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dev_sq_post_request_body import DevSqPostRequestBody + +class DevSqRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the devSq method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DevSqRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/devSq", path_parameters) + + async def post(self,body: DevSqPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action devSq + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DevSqPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action devSq + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DevSqRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DevSqRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DevSqRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DevSqRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dget/dget_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dget/dget_post_request_body.py new file mode 100644 index 00000000000..93539eb1640 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dget/dget_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DgetPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DgetPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DgetPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DgetPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dget/dget_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dget/dget_request_builder.py new file mode 100644 index 00000000000..b77d32b7145 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dget/dget_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dget_post_request_body import DgetPostRequestBody + +class DgetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dget method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DgetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dget", path_parameters) + + async def post(self,body: DgetPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dget + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DgetPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dget + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DgetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DgetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DgetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DgetRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/disc/disc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/disc/disc_post_request_body.py new file mode 100644 index 00000000000..2465df59d7e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/disc/disc_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DiscPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The pr property + pr: Optional[Json] = None + # The redemption property + redemption: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DiscPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DiscPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DiscPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "pr": lambda n : setattr(self, 'pr', n.get_object_value(Json)), + "redemption": lambda n : setattr(self, 'redemption', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("pr", self.pr) + writer.write_object_value("redemption", self.redemption) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/disc/disc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/disc/disc_request_builder.py new file mode 100644 index 00000000000..7bd12af0a9c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/disc/disc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .disc_post_request_body import DiscPostRequestBody + +class DiscRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the disc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DiscRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/disc", path_parameters) + + async def post(self,body: DiscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action disc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DiscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action disc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DiscRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DiscRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DiscRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DiscRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmax/dmax_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmax/dmax_post_request_body.py new file mode 100644 index 00000000000..732369b96af --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmax/dmax_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DmaxPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DmaxPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DmaxPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DmaxPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmax/dmax_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmax/dmax_request_builder.py new file mode 100644 index 00000000000..826f1271975 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmax/dmax_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dmax_post_request_body import DmaxPostRequestBody + +class DmaxRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dmax method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DmaxRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dmax", path_parameters) + + async def post(self,body: DmaxPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dmax + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DmaxPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dmax + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DmaxRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DmaxRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DmaxRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DmaxRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmin/dmin_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmin/dmin_post_request_body.py new file mode 100644 index 00000000000..a58cf94a9a6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmin/dmin_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DminPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DminPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DminPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DminPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmin/dmin_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmin/dmin_request_builder.py new file mode 100644 index 00000000000..2c621dc3611 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dmin/dmin_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dmin_post_request_body import DminPostRequestBody + +class DminRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dmin method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DminRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dmin", path_parameters) + + async def post(self,body: DminPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dmin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DminPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dmin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DminRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DminRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DminRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DminRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar/dollar_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar/dollar_post_request_body.py new file mode 100644 index 00000000000..08efcb770cf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar/dollar_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DollarPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The decimals property + decimals: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DollarPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DollarPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DollarPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "decimals": lambda n : setattr(self, 'decimals', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("decimals", self.decimals) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar/dollar_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar/dollar_request_builder.py new file mode 100644 index 00000000000..25924481fed --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar/dollar_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dollar_post_request_body import DollarPostRequestBody + +class DollarRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dollar method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DollarRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dollar", path_parameters) + + async def post(self,body: DollarPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dollar + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DollarPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dollar + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DollarRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DollarRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DollarRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DollarRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_de/dollar_de_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_de/dollar_de_post_request_body.py new file mode 100644 index 00000000000..240648a2562 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_de/dollar_de_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DollarDePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fraction property + fraction: Optional[Json] = None + # The fractionalDollar property + fractional_dollar: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DollarDePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DollarDePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DollarDePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "fraction": lambda n : setattr(self, 'fraction', n.get_object_value(Json)), + "fractionalDollar": lambda n : setattr(self, 'fractional_dollar', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fraction", self.fraction) + writer.write_object_value("fractionalDollar", self.fractional_dollar) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_de/dollar_de_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_de/dollar_de_request_builder.py new file mode 100644 index 00000000000..f509ea073b5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_de/dollar_de_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dollar_de_post_request_body import DollarDePostRequestBody + +class DollarDeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dollarDe method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DollarDeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dollarDe", path_parameters) + + async def post(self,body: DollarDePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dollarDe + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DollarDePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dollarDe + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DollarDeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DollarDeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DollarDeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DollarDeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_fr/dollar_fr_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_fr/dollar_fr_post_request_body.py new file mode 100644 index 00000000000..9401c7a0a22 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_fr/dollar_fr_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DollarFrPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The decimalDollar property + decimal_dollar: Optional[Json] = None + # The fraction property + fraction: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DollarFrPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DollarFrPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DollarFrPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "decimalDollar": lambda n : setattr(self, 'decimal_dollar', n.get_object_value(Json)), + "fraction": lambda n : setattr(self, 'fraction', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("decimalDollar", self.decimal_dollar) + writer.write_object_value("fraction", self.fraction) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.py new file mode 100644 index 00000000000..10f473b9569 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dollar_fr/dollar_fr_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dollar_fr_post_request_body import DollarFrPostRequestBody + +class DollarFrRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dollarFr method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DollarFrRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dollarFr", path_parameters) + + async def post(self,body: DollarFrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dollarFr + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DollarFrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dollarFr + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DollarFrRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DollarFrRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DollarFrRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DollarFrRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dproduct/dproduct_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dproduct/dproduct_post_request_body.py new file mode 100644 index 00000000000..446f1b19c36 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dproduct/dproduct_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DproductPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DproductPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DproductPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DproductPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dproduct/dproduct_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dproduct/dproduct_request_builder.py new file mode 100644 index 00000000000..c8afc32a6fa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dproduct/dproduct_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dproduct_post_request_body import DproductPostRequestBody + +class DproductRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dproduct method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DproductRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dproduct", path_parameters) + + async def post(self,body: DproductPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dproduct + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DproductPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dproduct + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DproductRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DproductRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DproductRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DproductRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev/dst_dev_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev/dst_dev_post_request_body.py new file mode 100644 index 00000000000..8c9bd3ab712 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev/dst_dev_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DstDevPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DstDevPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DstDevPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DstDevPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev/dst_dev_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev/dst_dev_request_builder.py new file mode 100644 index 00000000000..ce0bfa5008b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev/dst_dev_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dst_dev_post_request_body import DstDevPostRequestBody + +class DstDevRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dstDev method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DstDevRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dstDev", path_parameters) + + async def post(self,body: DstDevPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dstDev + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DstDevPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dstDev + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DstDevRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DstDevRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DstDevRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DstDevRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev_p/dst_dev_p_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev_p/dst_dev_p_post_request_body.py new file mode 100644 index 00000000000..c8da9c45ed5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev_p/dst_dev_p_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DstDevPPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DstDevPPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DstDevPPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DstDevPPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.py new file mode 100644 index 00000000000..f09425deef3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dst_dev_p/dst_dev_p_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dst_dev_p_post_request_body import DstDevPPostRequestBody + +class DstDevPRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dstDevP method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DstDevPRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dstDevP", path_parameters) + + async def post(self,body: DstDevPPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dstDevP + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DstDevPPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dstDevP + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DstDevPRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DstDevPRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DstDevPRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DstDevPRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dsum/dsum_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dsum/dsum_post_request_body.py new file mode 100644 index 00000000000..3f8df5679d5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dsum/dsum_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DsumPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DsumPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DsumPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DsumPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dsum/dsum_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dsum/dsum_request_builder.py new file mode 100644 index 00000000000..b7cb3fbc123 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dsum/dsum_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dsum_post_request_body import DsumPostRequestBody + +class DsumRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dsum method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DsumRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dsum", path_parameters) + + async def post(self,body: DsumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dsum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DsumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dsum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DsumRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DsumRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DsumRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DsumRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/duration/duration_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/duration/duration_post_request_body.py new file mode 100644 index 00000000000..ebef0bfdc52 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/duration/duration_post_request_body.py @@ -0,0 +1,76 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DurationPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The coupon property + coupon: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + # The yld property + yld: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DurationPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DurationPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DurationPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "coupon": lambda n : setattr(self, 'coupon', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + "yld": lambda n : setattr(self, 'yld', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("coupon", self.coupon) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_object_value("yld", self.yld) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/duration/duration_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/duration/duration_request_builder.py new file mode 100644 index 00000000000..0746e3277ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/duration/duration_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .duration_post_request_body import DurationPostRequestBody + +class DurationRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the duration method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DurationRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/duration", path_parameters) + + async def post(self,body: DurationPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action duration + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DurationPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action duration + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DurationRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DurationRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DurationRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DurationRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar/dvar_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar/dvar_post_request_body.py new file mode 100644 index 00000000000..9c4680c5130 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar/dvar_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DvarPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DvarPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DvarPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DvarPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar/dvar_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar/dvar_request_builder.py new file mode 100644 index 00000000000..4d9e437318a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar/dvar_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dvar_post_request_body import DvarPostRequestBody + +class DvarRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dvar method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DvarRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dvar", path_parameters) + + async def post(self,body: DvarPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dvar + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DvarPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dvar + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DvarRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DvarRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DvarRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DvarRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar_p/dvar_p_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar_p/dvar_p_post_request_body.py new file mode 100644 index 00000000000..40786363f72 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar_p/dvar_p_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class DvarPPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The database property + database: Optional[Json] = None + # The field property + field: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DvarPPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DvarPPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DvarPPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "database": lambda n : setattr(self, 'database', n.get_object_value(Json)), + "field": lambda n : setattr(self, 'field', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("database", self.database) + writer.write_object_value("field", self.field) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar_p/dvar_p_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar_p/dvar_p_request_builder.py new file mode 100644 index 00000000000..999a2b81dbe --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/dvar_p/dvar_p_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .dvar_p_post_request_body import DvarPPostRequestBody + +class DvarPRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dvarP method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DvarPRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/dvarP", path_parameters) + + async def post(self,body: DvarPPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action dvarP + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: DvarPPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action dvarP + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DvarPRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DvarPRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DvarPRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DvarPRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_post_request_body.py new file mode 100644 index 00000000000..1aef19d5ad2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Ecma_CeilingPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The significance property + significance: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Ecma_CeilingPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Ecma_CeilingPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Ecma_CeilingPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "significance": lambda n : setattr(self, 'significance', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("significance", self.significance) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.py new file mode 100644 index 00000000000..3d6b2603997 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ecma_ceiling/ecma_ceiling_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .ecma_ceiling_post_request_body import Ecma_CeilingPostRequestBody + +class Ecma_CeilingRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the ecma_Ceiling method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Ecma_CeilingRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/ecma_Ceiling", path_parameters) + + async def post(self,body: Ecma_CeilingPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action ecma_Ceiling + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Ecma_CeilingPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action ecma_Ceiling + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Ecma_CeilingRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Ecma_CeilingRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Ecma_CeilingRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Ecma_CeilingRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/edate/edate_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/edate/edate_post_request_body.py new file mode 100644 index 00000000000..a313c6ac31e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/edate/edate_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class EdatePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The months property + months: Optional[Json] = None + # The startDate property + start_date: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> EdatePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: EdatePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return EdatePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "months": lambda n : setattr(self, 'months', n.get_object_value(Json)), + "startDate": lambda n : setattr(self, 'start_date', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("months", self.months) + writer.write_object_value("startDate", self.start_date) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/edate/edate_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/edate/edate_request_builder.py new file mode 100644 index 00000000000..8fdaea12f73 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/edate/edate_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .edate_post_request_body import EdatePostRequestBody + +class EdateRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the edate method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new EdateRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/edate", path_parameters) + + async def post(self,body: EdatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action edate + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: EdatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action edate + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> EdateRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: EdateRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return EdateRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class EdateRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/effect/effect_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/effect/effect_post_request_body.py new file mode 100644 index 00000000000..20d83d25773 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/effect/effect_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class EffectPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The nominalRate property + nominal_rate: Optional[Json] = None + # The npery property + npery: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> EffectPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: EffectPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return EffectPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "nominalRate": lambda n : setattr(self, 'nominal_rate', n.get_object_value(Json)), + "npery": lambda n : setattr(self, 'npery', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("nominalRate", self.nominal_rate) + writer.write_object_value("npery", self.npery) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/effect/effect_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/effect/effect_request_builder.py new file mode 100644 index 00000000000..d29240514be --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/effect/effect_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .effect_post_request_body import EffectPostRequestBody + +class EffectRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the effect method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new EffectRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/effect", path_parameters) + + async def post(self,body: EffectPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action effect + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: EffectPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action effect + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> EffectRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: EffectRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return EffectRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class EffectRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/eo_month/eo_month_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/eo_month/eo_month_post_request_body.py new file mode 100644 index 00000000000..c86427e11bc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/eo_month/eo_month_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class EoMonthPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The months property + months: Optional[Json] = None + # The startDate property + start_date: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> EoMonthPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: EoMonthPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return EoMonthPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "months": lambda n : setattr(self, 'months', n.get_object_value(Json)), + "startDate": lambda n : setattr(self, 'start_date', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("months", self.months) + writer.write_object_value("startDate", self.start_date) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/eo_month/eo_month_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/eo_month/eo_month_request_builder.py new file mode 100644 index 00000000000..4368a39b4f7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/eo_month/eo_month_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .eo_month_post_request_body import EoMonthPostRequestBody + +class EoMonthRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the eoMonth method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new EoMonthRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/eoMonth", path_parameters) + + async def post(self,body: EoMonthPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action eoMonth + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: EoMonthPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action eoMonth + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> EoMonthRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: EoMonthRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return EoMonthRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class EoMonthRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf/erf_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf/erf_post_request_body.py new file mode 100644 index 00000000000..958d1714b05 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf/erf_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ErfPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The lowerLimit property + lower_limit: Optional[Json] = None + # The upperLimit property + upper_limit: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ErfPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ErfPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ErfPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "lowerLimit": lambda n : setattr(self, 'lower_limit', n.get_object_value(Json)), + "upperLimit": lambda n : setattr(self, 'upper_limit', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("lowerLimit", self.lower_limit) + writer.write_object_value("upperLimit", self.upper_limit) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf/erf_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf/erf_request_builder.py new file mode 100644 index 00000000000..a08e94996b9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf/erf_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .erf_post_request_body import ErfPostRequestBody + +class ErfRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the erf method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ErfRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/erf", path_parameters) + + async def post(self,body: ErfPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action erf + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ErfPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action erf + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ErfRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ErfRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ErfRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ErfRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c/erf_c_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c/erf_c_post_request_body.py new file mode 100644 index 00000000000..0171f93220d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c/erf_c_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ErfCPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ErfCPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ErfCPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ErfCPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c/erf_c_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c/erf_c_request_builder.py new file mode 100644 index 00000000000..f36c0cb9f92 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c/erf_c_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .erf_c_post_request_body import ErfCPostRequestBody + +class ErfCRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the erfC method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ErfCRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/erfC", path_parameters) + + async def post(self,body: ErfCPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action erfC + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ErfCPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action erfC + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ErfCRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ErfCRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ErfCRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ErfCRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c_precise/erf_c_precise_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c_precise/erf_c_precise_post_request_body.py new file mode 100644 index 00000000000..e0054362f66 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c_precise/erf_c_precise_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ErfC_PrecisePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The X property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ErfC_PrecisePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ErfC_PrecisePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ErfC_PrecisePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "X": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("X", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.py new file mode 100644 index 00000000000..ce0fe86e6e7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_c_precise/erf_c_precise_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .erf_c_precise_post_request_body import ErfC_PrecisePostRequestBody + +class ErfC_PreciseRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the erfC_Precise method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ErfC_PreciseRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/erfC_Precise", path_parameters) + + async def post(self,body: ErfC_PrecisePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action erfC_Precise + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ErfC_PrecisePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action erfC_Precise + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ErfC_PreciseRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ErfC_PreciseRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ErfC_PreciseRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ErfC_PreciseRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_precise/erf_precise_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_precise/erf_precise_post_request_body.py new file mode 100644 index 00000000000..7135d80acce --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_precise/erf_precise_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Erf_PrecisePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The X property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Erf_PrecisePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Erf_PrecisePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Erf_PrecisePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "X": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("X", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_precise/erf_precise_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_precise/erf_precise_request_builder.py new file mode 100644 index 00000000000..531ade92b2f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/erf_precise/erf_precise_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .erf_precise_post_request_body import Erf_PrecisePostRequestBody + +class Erf_PreciseRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the erf_Precise method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Erf_PreciseRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/erf_Precise", path_parameters) + + async def post(self,body: Erf_PrecisePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action erf_Precise + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Erf_PrecisePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action erf_Precise + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Erf_PreciseRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Erf_PreciseRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Erf_PreciseRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Erf_PreciseRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/error_type/error_type_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/error_type/error_type_post_request_body.py new file mode 100644 index 00000000000..5f3ba686bb3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/error_type/error_type_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Error_TypePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The errorVal property + error_val: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Error_TypePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Error_TypePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Error_TypePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "errorVal": lambda n : setattr(self, 'error_val', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("errorVal", self.error_val) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/error_type/error_type_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/error_type/error_type_request_builder.py new file mode 100644 index 00000000000..19cb9957be8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/error_type/error_type_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .error_type_post_request_body import Error_TypePostRequestBody + +class Error_TypeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the error_Type method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Error_TypeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/error_Type", path_parameters) + + async def post(self,body: Error_TypePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action error_Type + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Error_TypePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action error_Type + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Error_TypeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Error_TypeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Error_TypeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Error_TypeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/even/even_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/even/even_post_request_body.py new file mode 100644 index 00000000000..4e042f16939 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/even/even_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class EvenPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> EvenPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: EvenPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return EvenPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/even/even_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/even/even_request_builder.py new file mode 100644 index 00000000000..70af085d7ee --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/even/even_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .even_post_request_body import EvenPostRequestBody + +class EvenRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the even method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new EvenRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/even", path_parameters) + + async def post(self,body: EvenPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action even + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: EvenPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action even + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> EvenRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: EvenRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return EvenRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class EvenRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exact/exact_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exact/exact_post_request_body.py new file mode 100644 index 00000000000..2e90cf12b11 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exact/exact_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ExactPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text1 property + text1: Optional[Json] = None + # The text2 property + text2: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ExactPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ExactPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ExactPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text1": lambda n : setattr(self, 'text1', n.get_object_value(Json)), + "text2": lambda n : setattr(self, 'text2', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text1", self.text1) + writer.write_object_value("text2", self.text2) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exact/exact_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exact/exact_request_builder.py new file mode 100644 index 00000000000..8c92bcde448 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exact/exact_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .exact_post_request_body import ExactPostRequestBody + +class ExactRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the exact method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ExactRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/exact", path_parameters) + + async def post(self,body: ExactPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action exact + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ExactPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action exact + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ExactRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ExactRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ExactRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ExactRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exp/exp_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exp/exp_post_request_body.py new file mode 100644 index 00000000000..4a2e99ebbbd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exp/exp_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ExpPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ExpPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ExpPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ExpPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exp/exp_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exp/exp_request_builder.py new file mode 100644 index 00000000000..a4db1c41d63 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/exp/exp_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .exp_post_request_body import ExpPostRequestBody + +class ExpRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the exp method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ExpRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/exp", path_parameters) + + async def post(self,body: ExpPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action exp + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ExpPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action exp + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ExpRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ExpRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ExpRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ExpRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/expon_dist/expon_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/expon_dist/expon_dist_post_request_body.py new file mode 100644 index 00000000000..f5eede957cb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/expon_dist/expon_dist_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Expon_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The lambda property + lambda_: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Expon_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Expon_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Expon_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "lambda": lambda n : setattr(self, 'lambda_', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("lambda", self.lambda_) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/expon_dist/expon_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/expon_dist/expon_dist_request_builder.py new file mode 100644 index 00000000000..64ad8a23386 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/expon_dist/expon_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .expon_dist_post_request_body import Expon_DistPostRequestBody + +class Expon_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the expon_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Expon_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/expon_Dist", path_parameters) + + async def post(self,body: Expon_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action expon_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Expon_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action expon_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Expon_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Expon_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Expon_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Expon_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist/f_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist/f_dist_post_request_body.py new file mode 100644 index 00000000000..48f15568b31 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist/f_dist_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class F_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The degFreedom1 property + deg_freedom1: Optional[Json] = None + # The degFreedom2 property + deg_freedom2: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> F_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: F_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return F_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "degFreedom1": lambda n : setattr(self, 'deg_freedom1', n.get_object_value(Json)), + "degFreedom2": lambda n : setattr(self, 'deg_freedom2', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("degFreedom1", self.deg_freedom1) + writer.write_object_value("degFreedom2", self.deg_freedom2) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist/f_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist/f_dist_request_builder.py new file mode 100644 index 00000000000..c016bdd9e8c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist/f_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .f_dist_post_request_body import F_DistPostRequestBody + +class F_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the f_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new F_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/f_Dist", path_parameters) + + async def post(self,body: F_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action f_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: F_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action f_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> F_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: F_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return F_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class F_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_post_request_body.py new file mode 100644 index 00000000000..ebc606839d0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class F_Dist_RTPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The degFreedom1 property + deg_freedom1: Optional[Json] = None + # The degFreedom2 property + deg_freedom2: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> F_Dist_RTPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: F_Dist_RTPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return F_Dist_RTPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "degFreedom1": lambda n : setattr(self, 'deg_freedom1', n.get_object_value(Json)), + "degFreedom2": lambda n : setattr(self, 'deg_freedom2', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("degFreedom1", self.deg_freedom1) + writer.write_object_value("degFreedom2", self.deg_freedom2) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_request_builder.py new file mode 100644 index 00000000000..f1a1db022f6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_dist_r_t/f_dist_r_t_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .f_dist_r_t_post_request_body import F_Dist_RTPostRequestBody + +class F_Dist_RTRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the f_Dist_RT method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new F_Dist_RTRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/f_Dist_RT", path_parameters) + + async def post(self,body: F_Dist_RTPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action f_Dist_RT + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: F_Dist_RTPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action f_Dist_RT + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> F_Dist_RTRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: F_Dist_RTRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return F_Dist_RTRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class F_Dist_RTRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv/f_inv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv/f_inv_post_request_body.py new file mode 100644 index 00000000000..65079a85a2b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv/f_inv_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class F_InvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The degFreedom1 property + deg_freedom1: Optional[Json] = None + # The degFreedom2 property + deg_freedom2: Optional[Json] = None + # The probability property + probability: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> F_InvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: F_InvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return F_InvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "degFreedom1": lambda n : setattr(self, 'deg_freedom1', n.get_object_value(Json)), + "degFreedom2": lambda n : setattr(self, 'deg_freedom2', n.get_object_value(Json)), + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("degFreedom1", self.deg_freedom1) + writer.write_object_value("degFreedom2", self.deg_freedom2) + writer.write_object_value("probability", self.probability) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv/f_inv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv/f_inv_request_builder.py new file mode 100644 index 00000000000..6031b180949 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv/f_inv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .f_inv_post_request_body import F_InvPostRequestBody + +class F_InvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the f_Inv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new F_InvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/f_Inv", path_parameters) + + async def post(self,body: F_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action f_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: F_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action f_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> F_InvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: F_InvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return F_InvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class F_InvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_post_request_body.py new file mode 100644 index 00000000000..06466b30d0e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class F_Inv_RTPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The degFreedom1 property + deg_freedom1: Optional[Json] = None + # The degFreedom2 property + deg_freedom2: Optional[Json] = None + # The probability property + probability: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> F_Inv_RTPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: F_Inv_RTPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return F_Inv_RTPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "degFreedom1": lambda n : setattr(self, 'deg_freedom1', n.get_object_value(Json)), + "degFreedom2": lambda n : setattr(self, 'deg_freedom2', n.get_object_value(Json)), + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("degFreedom1", self.deg_freedom1) + writer.write_object_value("degFreedom2", self.deg_freedom2) + writer.write_object_value("probability", self.probability) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_request_builder.py new file mode 100644 index 00000000000..3d013f4c2fd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/f_inv_r_t/f_inv_r_t_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .f_inv_r_t_post_request_body import F_Inv_RTPostRequestBody + +class F_Inv_RTRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the f_Inv_RT method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new F_Inv_RTRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/f_Inv_RT", path_parameters) + + async def post(self,body: F_Inv_RTPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action f_Inv_RT + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: F_Inv_RTPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action f_Inv_RT + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> F_Inv_RTRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: F_Inv_RTRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return F_Inv_RTRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class F_Inv_RTRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact/fact_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact/fact_post_request_body.py new file mode 100644 index 00000000000..cc20a798654 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact/fact_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class FactPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FactPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FactPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FactPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact/fact_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact/fact_request_builder.py new file mode 100644 index 00000000000..c51d1057e8c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact/fact_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .fact_post_request_body import FactPostRequestBody + +class FactRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the fact method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FactRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/fact", path_parameters) + + async def post(self,body: FactPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action fact + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: FactPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action fact + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FactRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FactRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FactRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FactRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact_double/fact_double_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact_double/fact_double_post_request_body.py new file mode 100644 index 00000000000..98dc79ae92b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact_double/fact_double_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class FactDoublePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FactDoublePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FactDoublePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FactDoublePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact_double/fact_double_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact_double/fact_double_request_builder.py new file mode 100644 index 00000000000..0d0907d90e2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fact_double/fact_double_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .fact_double_post_request_body import FactDoublePostRequestBody + +class FactDoubleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the factDouble method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FactDoubleRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/factDouble", path_parameters) + + async def post(self,body: FactDoublePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action factDouble + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: FactDoublePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action factDouble + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FactDoubleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FactDoubleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FactDoubleRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FactDoubleRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/false_/false_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/false_/false_request_builder.py new file mode 100644 index 00000000000..3cd20a92d7e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/false_/false_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + +class FalseRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the false method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FalseRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/false", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action false + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action false + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> FalseRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FalseRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FalseRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FalseRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find/find_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find/find_post_request_body.py new file mode 100644 index 00000000000..962e06cf4b3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find/find_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class FindPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The findText property + find_text: Optional[Json] = None + # The startNum property + start_num: Optional[Json] = None + # The withinText property + within_text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FindPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FindPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FindPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "findText": lambda n : setattr(self, 'find_text', n.get_object_value(Json)), + "startNum": lambda n : setattr(self, 'start_num', n.get_object_value(Json)), + "withinText": lambda n : setattr(self, 'within_text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("findText", self.find_text) + writer.write_object_value("startNum", self.start_num) + writer.write_object_value("withinText", self.within_text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find/find_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find/find_request_builder.py new file mode 100644 index 00000000000..afb887a6e66 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find/find_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .find_post_request_body import FindPostRequestBody + +class FindRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the find method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FindRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/find", path_parameters) + + async def post(self,body: FindPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action find + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: FindPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action find + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FindRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FindRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FindRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FindRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find_b/find_b_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find_b/find_b_post_request_body.py new file mode 100644 index 00000000000..35f571f3ea9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find_b/find_b_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class FindBPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The findText property + find_text: Optional[Json] = None + # The startNum property + start_num: Optional[Json] = None + # The withinText property + within_text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FindBPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FindBPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FindBPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "findText": lambda n : setattr(self, 'find_text', n.get_object_value(Json)), + "startNum": lambda n : setattr(self, 'start_num', n.get_object_value(Json)), + "withinText": lambda n : setattr(self, 'within_text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("findText", self.find_text) + writer.write_object_value("startNum", self.start_num) + writer.write_object_value("withinText", self.within_text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find_b/find_b_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find_b/find_b_request_builder.py new file mode 100644 index 00000000000..f70bc86a868 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/find_b/find_b_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .find_b_post_request_body import FindBPostRequestBody + +class FindBRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the findB method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FindBRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/findB", path_parameters) + + async def post(self,body: FindBPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action findB + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: FindBPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action findB + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FindBRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FindBRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FindBRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FindBRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher/fisher_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher/fisher_post_request_body.py new file mode 100644 index 00000000000..768073c7753 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher/fisher_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class FisherPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FisherPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FisherPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FisherPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher/fisher_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher/fisher_request_builder.py new file mode 100644 index 00000000000..05abdd9bccf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher/fisher_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .fisher_post_request_body import FisherPostRequestBody + +class FisherRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the fisher method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FisherRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/fisher", path_parameters) + + async def post(self,body: FisherPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action fisher + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: FisherPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action fisher + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FisherRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FisherRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FisherRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FisherRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher_inv/fisher_inv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher_inv/fisher_inv_post_request_body.py new file mode 100644 index 00000000000..f313eeb2ccf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher_inv/fisher_inv_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class FisherInvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The y property + y: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FisherInvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FisherInvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FisherInvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "y": lambda n : setattr(self, 'y', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("y", self.y) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher_inv/fisher_inv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher_inv/fisher_inv_request_builder.py new file mode 100644 index 00000000000..e8e99bcabb0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fisher_inv/fisher_inv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .fisher_inv_post_request_body import FisherInvPostRequestBody + +class FisherInvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the fisherInv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FisherInvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/fisherInv", path_parameters) + + async def post(self,body: FisherInvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action fisherInv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: FisherInvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action fisherInv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FisherInvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FisherInvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FisherInvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FisherInvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fixed/fixed_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fixed/fixed_post_request_body.py new file mode 100644 index 00000000000..5edd1250cd8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fixed/fixed_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class FixedPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The decimals property + decimals: Optional[Json] = None + # The noCommas property + no_commas: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FixedPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FixedPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FixedPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "decimals": lambda n : setattr(self, 'decimals', n.get_object_value(Json)), + "noCommas": lambda n : setattr(self, 'no_commas', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("decimals", self.decimals) + writer.write_object_value("noCommas", self.no_commas) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fixed/fixed_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fixed/fixed_request_builder.py new file mode 100644 index 00000000000..6de85243da6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fixed/fixed_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .fixed_post_request_body import FixedPostRequestBody + +class FixedRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the fixed method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FixedRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/fixed", path_parameters) + + async def post(self,body: FixedPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action fixed + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: FixedPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action fixed + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FixedRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FixedRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FixedRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FixedRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_math/floor_math_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_math/floor_math_post_request_body.py new file mode 100644 index 00000000000..9a30efd6454 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_math/floor_math_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Floor_MathPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The mode property + mode: Optional[Json] = None + # The number property + number: Optional[Json] = None + # The significance property + significance: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Floor_MathPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Floor_MathPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Floor_MathPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "mode": lambda n : setattr(self, 'mode', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "significance": lambda n : setattr(self, 'significance', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("mode", self.mode) + writer.write_object_value("number", self.number) + writer.write_object_value("significance", self.significance) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_math/floor_math_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_math/floor_math_request_builder.py new file mode 100644 index 00000000000..257bd127072 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_math/floor_math_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .floor_math_post_request_body import Floor_MathPostRequestBody + +class Floor_MathRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the floor_Math method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Floor_MathRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/floor_Math", path_parameters) + + async def post(self,body: Floor_MathPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action floor_Math + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Floor_MathPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action floor_Math + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Floor_MathRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Floor_MathRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Floor_MathRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Floor_MathRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_precise/floor_precise_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_precise/floor_precise_post_request_body.py new file mode 100644 index 00000000000..3292ca7e34a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_precise/floor_precise_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Floor_PrecisePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The significance property + significance: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Floor_PrecisePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Floor_PrecisePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Floor_PrecisePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "significance": lambda n : setattr(self, 'significance', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("significance", self.significance) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_precise/floor_precise_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_precise/floor_precise_request_builder.py new file mode 100644 index 00000000000..3513870124f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/floor_precise/floor_precise_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .floor_precise_post_request_body import Floor_PrecisePostRequestBody + +class Floor_PreciseRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the floor_Precise method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Floor_PreciseRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/floor_Precise", path_parameters) + + async def post(self,body: Floor_PrecisePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action floor_Precise + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Floor_PrecisePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action floor_Precise + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Floor_PreciseRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Floor_PreciseRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Floor_PreciseRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Floor_PreciseRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/functions_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/functions_request_builder.py new file mode 100644 index 00000000000..1667a015a2f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/functions_request_builder.py @@ -0,0 +1,3847 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.workbook_functions import WorkbookFunctions + from .abs.abs_request_builder import AbsRequestBuilder + from .accr_int.accr_int_request_builder import AccrIntRequestBuilder + from .accr_int_m.accr_int_m_request_builder import AccrIntMRequestBuilder + from .acos.acos_request_builder import AcosRequestBuilder + from .acosh.acosh_request_builder import AcoshRequestBuilder + from .acot.acot_request_builder import AcotRequestBuilder + from .acoth.acoth_request_builder import AcothRequestBuilder + from .amor_degrc.amor_degrc_request_builder import AmorDegrcRequestBuilder + from .amor_linc.amor_linc_request_builder import AmorLincRequestBuilder + from .and_.and_request_builder import AndRequestBuilder + from .arabic.arabic_request_builder import ArabicRequestBuilder + from .areas.areas_request_builder import AreasRequestBuilder + from .asc.asc_request_builder import AscRequestBuilder + from .asin.asin_request_builder import AsinRequestBuilder + from .asinh.asinh_request_builder import AsinhRequestBuilder + from .atan.atan_request_builder import AtanRequestBuilder + from .atan2.atan2_request_builder import Atan2RequestBuilder + from .atanh.atanh_request_builder import AtanhRequestBuilder + from .average.average_request_builder import AverageRequestBuilder + from .average_a.average_a_request_builder import AverageARequestBuilder + from .average_if.average_if_request_builder import AverageIfRequestBuilder + from .average_ifs.average_ifs_request_builder import AverageIfsRequestBuilder + from .ave_dev.ave_dev_request_builder import AveDevRequestBuilder + from .baht_text.baht_text_request_builder import BahtTextRequestBuilder + from .base.base_request_builder_ import BaseRequestBuilder_ + from .bessel_i.bessel_i_request_builder import BesselIRequestBuilder + from .bessel_j.bessel_j_request_builder import BesselJRequestBuilder + from .bessel_k.bessel_k_request_builder import BesselKRequestBuilder + from .bessel_y.bessel_y_request_builder import BesselYRequestBuilder + from .beta_dist.beta_dist_request_builder import Beta_DistRequestBuilder + from .beta_inv.beta_inv_request_builder import Beta_InvRequestBuilder + from .bin2_dec.bin2_dec_request_builder import Bin2DecRequestBuilder + from .bin2_hex.bin2_hex_request_builder import Bin2HexRequestBuilder + from .bin2_oct.bin2_oct_request_builder import Bin2OctRequestBuilder + from .binom_dist.binom_dist_request_builder import Binom_DistRequestBuilder + from .binom_dist_range.binom_dist_range_request_builder import Binom_Dist_RangeRequestBuilder + from .binom_inv.binom_inv_request_builder import Binom_InvRequestBuilder + from .bitand.bitand_request_builder import BitandRequestBuilder + from .bitlshift.bitlshift_request_builder import BitlshiftRequestBuilder + from .bitor.bitor_request_builder import BitorRequestBuilder + from .bitrshift.bitrshift_request_builder import BitrshiftRequestBuilder + from .bitxor.bitxor_request_builder import BitxorRequestBuilder + from .ceiling_math.ceiling_math_request_builder import Ceiling_MathRequestBuilder + from .ceiling_precise.ceiling_precise_request_builder import Ceiling_PreciseRequestBuilder + from .char.char_request_builder import CharRequestBuilder + from .chi_sq_dist.chi_sq_dist_request_builder import ChiSq_DistRequestBuilder + from .chi_sq_dist_r_t.chi_sq_dist_r_t_request_builder import ChiSq_Dist_RTRequestBuilder + from .chi_sq_inv.chi_sq_inv_request_builder import ChiSq_InvRequestBuilder + from .chi_sq_inv_r_t.chi_sq_inv_r_t_request_builder import ChiSq_Inv_RTRequestBuilder + from .choose.choose_request_builder import ChooseRequestBuilder + from .clean.clean_request_builder import CleanRequestBuilder + from .code.code_request_builder import CodeRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder + from .combin.combin_request_builder import CombinRequestBuilder + from .combina.combina_request_builder import CombinaRequestBuilder + from .complex.complex_request_builder import ComplexRequestBuilder + from .concatenate.concatenate_request_builder import ConcatenateRequestBuilder + from .confidence_norm.confidence_norm_request_builder import Confidence_NormRequestBuilder + from .confidence_t.confidence_t_request_builder import Confidence_TRequestBuilder + from .convert.convert_request_builder import ConvertRequestBuilder + from .cos.cos_request_builder import CosRequestBuilder + from .cosh.cosh_request_builder import CoshRequestBuilder + from .cot.cot_request_builder import CotRequestBuilder + from .coth.coth_request_builder import CothRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .count_a.count_a_request_builder import CountARequestBuilder + from .count_blank.count_blank_request_builder import CountBlankRequestBuilder + from .count_if.count_if_request_builder import CountIfRequestBuilder + from .count_ifs.count_ifs_request_builder import CountIfsRequestBuilder + from .coup_days.coup_days_request_builder import CoupDaysRequestBuilder + from .coup_days_nc.coup_days_nc_request_builder import CoupDaysNcRequestBuilder + from .coup_day_bs.coup_day_bs_request_builder import CoupDayBsRequestBuilder + from .coup_ncd.coup_ncd_request_builder import CoupNcdRequestBuilder + from .coup_num.coup_num_request_builder import CoupNumRequestBuilder + from .coup_pcd.coup_pcd_request_builder import CoupPcdRequestBuilder + from .csc.csc_request_builder import CscRequestBuilder + from .csch.csch_request_builder import CschRequestBuilder + from .cum_i_pmt.cum_i_pmt_request_builder import CumIPmtRequestBuilder + from .cum_princ.cum_princ_request_builder import CumPrincRequestBuilder + from .date.date_request_builder import DateRequestBuilder + from .datevalue.datevalue_request_builder import DatevalueRequestBuilder + from .daverage.daverage_request_builder import DaverageRequestBuilder + from .day.day_request_builder import DayRequestBuilder + from .days.days_request_builder import DaysRequestBuilder + from .days360.days360_request_builder import Days360RequestBuilder + from .db.db_request_builder import DbRequestBuilder + from .dbcs.dbcs_request_builder import DbcsRequestBuilder + from .dcount.dcount_request_builder import DcountRequestBuilder + from .dcount_a.dcount_a_request_builder import DcountARequestBuilder + from .ddb.ddb_request_builder import DdbRequestBuilder + from .dec2_bin.dec2_bin_request_builder import Dec2BinRequestBuilder + from .dec2_hex.dec2_hex_request_builder import Dec2HexRequestBuilder + from .dec2_oct.dec2_oct_request_builder import Dec2OctRequestBuilder + from .decimal.decimal_request_builder import DecimalRequestBuilder + from .degrees.degrees_request_builder import DegreesRequestBuilder + from .delta.delta_request_builder import DeltaRequestBuilder + from .dev_sq.dev_sq_request_builder import DevSqRequestBuilder + from .dget.dget_request_builder import DgetRequestBuilder + from .disc.disc_request_builder import DiscRequestBuilder + from .dmax.dmax_request_builder import DmaxRequestBuilder + from .dmin.dmin_request_builder import DminRequestBuilder + from .dollar.dollar_request_builder import DollarRequestBuilder + from .dollar_de.dollar_de_request_builder import DollarDeRequestBuilder + from .dollar_fr.dollar_fr_request_builder import DollarFrRequestBuilder + from .dproduct.dproduct_request_builder import DproductRequestBuilder + from .dst_dev.dst_dev_request_builder import DstDevRequestBuilder + from .dst_dev_p.dst_dev_p_request_builder import DstDevPRequestBuilder + from .dsum.dsum_request_builder import DsumRequestBuilder + from .duration.duration_request_builder import DurationRequestBuilder + from .dvar.dvar_request_builder import DvarRequestBuilder + from .dvar_p.dvar_p_request_builder import DvarPRequestBuilder + from .ecma_ceiling.ecma_ceiling_request_builder import Ecma_CeilingRequestBuilder + from .edate.edate_request_builder import EdateRequestBuilder + from .effect.effect_request_builder import EffectRequestBuilder + from .eo_month.eo_month_request_builder import EoMonthRequestBuilder + from .erf.erf_request_builder import ErfRequestBuilder + from .erf_c.erf_c_request_builder import ErfCRequestBuilder + from .erf_c_precise.erf_c_precise_request_builder import ErfC_PreciseRequestBuilder + from .erf_precise.erf_precise_request_builder import Erf_PreciseRequestBuilder + from .error_type.error_type_request_builder import Error_TypeRequestBuilder + from .even.even_request_builder import EvenRequestBuilder + from .exact.exact_request_builder import ExactRequestBuilder + from .exp.exp_request_builder import ExpRequestBuilder + from .expon_dist.expon_dist_request_builder import Expon_DistRequestBuilder + from .fact.fact_request_builder import FactRequestBuilder + from .fact_double.fact_double_request_builder import FactDoubleRequestBuilder + from .false_.false_request_builder import FalseRequestBuilder + from .find.find_request_builder import FindRequestBuilder + from .find_b.find_b_request_builder import FindBRequestBuilder + from .fisher.fisher_request_builder import FisherRequestBuilder + from .fisher_inv.fisher_inv_request_builder import FisherInvRequestBuilder + from .fixed.fixed_request_builder import FixedRequestBuilder + from .floor_math.floor_math_request_builder import Floor_MathRequestBuilder + from .floor_precise.floor_precise_request_builder import Floor_PreciseRequestBuilder + from .fv.fv_request_builder import FvRequestBuilder + from .fvschedule.fvschedule_request_builder import FvscheduleRequestBuilder + from .f_dist.f_dist_request_builder import F_DistRequestBuilder + from .f_dist_r_t.f_dist_r_t_request_builder import F_Dist_RTRequestBuilder + from .f_inv.f_inv_request_builder import F_InvRequestBuilder + from .f_inv_r_t.f_inv_r_t_request_builder import F_Inv_RTRequestBuilder + from .gamma.gamma_request_builder import GammaRequestBuilder + from .gamma_dist.gamma_dist_request_builder import Gamma_DistRequestBuilder + from .gamma_inv.gamma_inv_request_builder import Gamma_InvRequestBuilder + from .gamma_ln.gamma_ln_request_builder import GammaLnRequestBuilder + from .gamma_ln_precise.gamma_ln_precise_request_builder import GammaLn_PreciseRequestBuilder + from .gauss.gauss_request_builder import GaussRequestBuilder + from .gcd.gcd_request_builder import GcdRequestBuilder + from .geo_mean.geo_mean_request_builder import GeoMeanRequestBuilder + from .ge_step.ge_step_request_builder import GeStepRequestBuilder + from .har_mean.har_mean_request_builder import HarMeanRequestBuilder + from .hex2_bin.hex2_bin_request_builder import Hex2BinRequestBuilder + from .hex2_dec.hex2_dec_request_builder import Hex2DecRequestBuilder + from .hex2_oct.hex2_oct_request_builder import Hex2OctRequestBuilder + from .hlookup.hlookup_request_builder import HlookupRequestBuilder + from .hour.hour_request_builder import HourRequestBuilder + from .hyperlink.hyperlink_request_builder import HyperlinkRequestBuilder + from .hyp_geom_dist.hyp_geom_dist_request_builder import HypGeom_DistRequestBuilder + from .if_.if_request_builder import IfRequestBuilder + from .imaginary.imaginary_request_builder import ImaginaryRequestBuilder + from .im_abs.im_abs_request_builder import ImAbsRequestBuilder + from .im_argument.im_argument_request_builder import ImArgumentRequestBuilder + from .im_conjugate.im_conjugate_request_builder import ImConjugateRequestBuilder + from .im_cos.im_cos_request_builder import ImCosRequestBuilder + from .im_cosh.im_cosh_request_builder import ImCoshRequestBuilder + from .im_cot.im_cot_request_builder import ImCotRequestBuilder + from .im_csc.im_csc_request_builder import ImCscRequestBuilder + from .im_csch.im_csch_request_builder import ImCschRequestBuilder + from .im_div.im_div_request_builder import ImDivRequestBuilder + from .im_exp.im_exp_request_builder import ImExpRequestBuilder + from .im_ln.im_ln_request_builder import ImLnRequestBuilder + from .im_log10.im_log10_request_builder import ImLog10RequestBuilder + from .im_log2.im_log2_request_builder import ImLog2RequestBuilder + from .im_power.im_power_request_builder import ImPowerRequestBuilder + from .im_product.im_product_request_builder import ImProductRequestBuilder + from .im_real.im_real_request_builder import ImRealRequestBuilder + from .im_sec.im_sec_request_builder import ImSecRequestBuilder + from .im_sech.im_sech_request_builder import ImSechRequestBuilder + from .im_sin.im_sin_request_builder import ImSinRequestBuilder + from .im_sinh.im_sinh_request_builder import ImSinhRequestBuilder + from .im_sqrt.im_sqrt_request_builder import ImSqrtRequestBuilder + from .im_sub.im_sub_request_builder import ImSubRequestBuilder + from .im_sum.im_sum_request_builder import ImSumRequestBuilder + from .im_tan.im_tan_request_builder import ImTanRequestBuilder + from .int.int_request_builder import IntRequestBuilder + from .int_rate.int_rate_request_builder import IntRateRequestBuilder + from .ipmt.ipmt_request_builder import IpmtRequestBuilder + from .irr.irr_request_builder import IrrRequestBuilder + from .iso_ceiling.iso_ceiling_request_builder import Iso_CeilingRequestBuilder + from .iso_week_num.iso_week_num_request_builder import IsoWeekNumRequestBuilder + from .ispmt.ispmt_request_builder import IspmtRequestBuilder + from .isref.isref_request_builder import IsrefRequestBuilder + from .is_err.is_err_request_builder import IsErrRequestBuilder + from .is_error.is_error_request_builder import IsErrorRequestBuilder + from .is_even.is_even_request_builder import IsEvenRequestBuilder + from .is_formula.is_formula_request_builder import IsFormulaRequestBuilder + from .is_logical.is_logical_request_builder import IsLogicalRequestBuilder + from .is_non_text.is_non_text_request_builder import IsNonTextRequestBuilder + from .is_number.is_number_request_builder import IsNumberRequestBuilder + from .is_n_a.is_n_a_request_builder import IsNARequestBuilder + from .is_odd.is_odd_request_builder import IsOddRequestBuilder + from .is_text.is_text_request_builder import IsTextRequestBuilder + from .kurt.kurt_request_builder import KurtRequestBuilder + from .large.large_request_builder import LargeRequestBuilder + from .lcm.lcm_request_builder import LcmRequestBuilder + from .left.left_request_builder import LeftRequestBuilder + from .leftb.leftb_request_builder import LeftbRequestBuilder + from .len.len_request_builder import LenRequestBuilder + from .lenb.lenb_request_builder import LenbRequestBuilder + from .ln.ln_request_builder import LnRequestBuilder + from .log.log_request_builder import LogRequestBuilder + from .log10.log10_request_builder import Log10RequestBuilder + from .log_norm_dist.log_norm_dist_request_builder import LogNorm_DistRequestBuilder + from .log_norm_inv.log_norm_inv_request_builder import LogNorm_InvRequestBuilder + from .lookup.lookup_request_builder import LookupRequestBuilder + from .lower.lower_request_builder import LowerRequestBuilder + from .match.match_request_builder import MatchRequestBuilder + from .max.max_request_builder import MaxRequestBuilder + from .max_a.max_a_request_builder import MaxARequestBuilder + from .mduration.mduration_request_builder import MdurationRequestBuilder + from .median.median_request_builder import MedianRequestBuilder + from .mid.mid_request_builder import MidRequestBuilder + from .midb.midb_request_builder import MidbRequestBuilder + from .min.min_request_builder import MinRequestBuilder + from .minute.minute_request_builder import MinuteRequestBuilder + from .min_a.min_a_request_builder import MinARequestBuilder + from .mirr.mirr_request_builder import MirrRequestBuilder + from .mod.mod_request_builder import ModRequestBuilder + from .month.month_request_builder import MonthRequestBuilder + from .mround.mround_request_builder import MroundRequestBuilder + from .multi_nomial.multi_nomial_request_builder import MultiNomialRequestBuilder + from .n.n_request_builder import NRequestBuilder + from .na.na_request_builder import NaRequestBuilder + from .neg_binom_dist.neg_binom_dist_request_builder import NegBinom_DistRequestBuilder + from .network_days.network_days_request_builder import NetworkDaysRequestBuilder + from .network_days_intl.network_days_intl_request_builder import NetworkDays_IntlRequestBuilder + from .nominal.nominal_request_builder import NominalRequestBuilder + from .norm_dist.norm_dist_request_builder import Norm_DistRequestBuilder + from .norm_inv.norm_inv_request_builder import Norm_InvRequestBuilder + from .norm_s_dist.norm_s_dist_request_builder import Norm_S_DistRequestBuilder + from .norm_s_inv.norm_s_inv_request_builder import Norm_S_InvRequestBuilder + from .not_.not_request_builder import NotRequestBuilder + from .now.now_request_builder import NowRequestBuilder + from .nper.nper_request_builder import NperRequestBuilder + from .npv.npv_request_builder import NpvRequestBuilder + from .number_value.number_value_request_builder import NumberValueRequestBuilder + from .oct2_bin.oct2_bin_request_builder import Oct2BinRequestBuilder + from .oct2_dec.oct2_dec_request_builder import Oct2DecRequestBuilder + from .oct2_hex.oct2_hex_request_builder import Oct2HexRequestBuilder + from .odd.odd_request_builder import OddRequestBuilder + from .odd_f_price.odd_f_price_request_builder import OddFPriceRequestBuilder + from .odd_f_yield.odd_f_yield_request_builder import OddFYieldRequestBuilder + from .odd_l_price.odd_l_price_request_builder import OddLPriceRequestBuilder + from .odd_l_yield.odd_l_yield_request_builder import OddLYieldRequestBuilder + from .or_.or_request_builder import OrRequestBuilder + from .pduration.pduration_request_builder import PdurationRequestBuilder + from .percentile_exc.percentile_exc_request_builder import Percentile_ExcRequestBuilder + from .percentile_inc.percentile_inc_request_builder import Percentile_IncRequestBuilder + from .percent_rank_exc.percent_rank_exc_request_builder import PercentRank_ExcRequestBuilder + from .percent_rank_inc.percent_rank_inc_request_builder import PercentRank_IncRequestBuilder + from .permut.permut_request_builder import PermutRequestBuilder + from .permutationa.permutationa_request_builder import PermutationaRequestBuilder + from .phi.phi_request_builder import PhiRequestBuilder + from .pi.pi_request_builder import PiRequestBuilder + from .pmt.pmt_request_builder import PmtRequestBuilder + from .poisson_dist.poisson_dist_request_builder import Poisson_DistRequestBuilder + from .power.power_request_builder import PowerRequestBuilder + from .ppmt.ppmt_request_builder import PpmtRequestBuilder + from .price.price_request_builder import PriceRequestBuilder + from .price_disc.price_disc_request_builder import PriceDiscRequestBuilder + from .price_mat.price_mat_request_builder import PriceMatRequestBuilder + from .product.product_request_builder import ProductRequestBuilder + from .proper.proper_request_builder import ProperRequestBuilder + from .pv.pv_request_builder import PvRequestBuilder + from .quartile_exc.quartile_exc_request_builder import Quartile_ExcRequestBuilder + from .quartile_inc.quartile_inc_request_builder import Quartile_IncRequestBuilder + from .quotient.quotient_request_builder import QuotientRequestBuilder + from .radians.radians_request_builder import RadiansRequestBuilder + from .rand.rand_request_builder import RandRequestBuilder + from .rand_between.rand_between_request_builder import RandBetweenRequestBuilder + from .rank_avg.rank_avg_request_builder import Rank_AvgRequestBuilder + from .rank_eq.rank_eq_request_builder import Rank_EqRequestBuilder + from .rate.rate_request_builder import RateRequestBuilder + from .received.received_request_builder import ReceivedRequestBuilder + from .replace.replace_request_builder import ReplaceRequestBuilder + from .replace_b.replace_b_request_builder import ReplaceBRequestBuilder + from .rept.rept_request_builder import ReptRequestBuilder + from .right.right_request_builder import RightRequestBuilder + from .rightb.rightb_request_builder import RightbRequestBuilder + from .roman.roman_request_builder import RomanRequestBuilder + from .round.round_request_builder import RoundRequestBuilder + from .round_down.round_down_request_builder import RoundDownRequestBuilder + from .round_up.round_up_request_builder import RoundUpRequestBuilder + from .rows.rows_request_builder import RowsRequestBuilder + from .rri.rri_request_builder import RriRequestBuilder + from .sec.sec_request_builder import SecRequestBuilder + from .sech.sech_request_builder import SechRequestBuilder + from .second.second_request_builder import SecondRequestBuilder + from .series_sum.series_sum_request_builder import SeriesSumRequestBuilder + from .sheet.sheet_request_builder import SheetRequestBuilder + from .sheets.sheets_request_builder import SheetsRequestBuilder + from .sign.sign_request_builder import SignRequestBuilder + from .sin.sin_request_builder import SinRequestBuilder + from .sinh.sinh_request_builder import SinhRequestBuilder + from .skew.skew_request_builder import SkewRequestBuilder + from .skew_p.skew_p_request_builder import Skew_pRequestBuilder + from .sln.sln_request_builder import SlnRequestBuilder + from .small.small_request_builder import SmallRequestBuilder + from .sqrt.sqrt_request_builder import SqrtRequestBuilder + from .sqrt_pi.sqrt_pi_request_builder import SqrtPiRequestBuilder + from .standardize.standardize_request_builder import StandardizeRequestBuilder + from .st_dev_a.st_dev_a_request_builder import StDevARequestBuilder + from .st_dev_p.st_dev_p_request_builder import StDev_PRequestBuilder + from .st_dev_p_a.st_dev_p_a_request_builder import StDevPARequestBuilder + from .st_dev_s.st_dev_s_request_builder import StDev_SRequestBuilder + from .substitute.substitute_request_builder import SubstituteRequestBuilder + from .subtotal.subtotal_request_builder import SubtotalRequestBuilder + from .sum.sum_request_builder import SumRequestBuilder + from .sum_if.sum_if_request_builder import SumIfRequestBuilder + from .sum_ifs.sum_ifs_request_builder import SumIfsRequestBuilder + from .sum_sq.sum_sq_request_builder import SumSqRequestBuilder + from .syd.syd_request_builder import SydRequestBuilder + from .t.t_request_builder import TRequestBuilder + from .tan.tan_request_builder import TanRequestBuilder + from .tanh.tanh_request_builder import TanhRequestBuilder + from .tbill_eq.tbill_eq_request_builder import TbillEqRequestBuilder + from .tbill_price.tbill_price_request_builder import TbillPriceRequestBuilder + from .tbill_yield.tbill_yield_request_builder import TbillYieldRequestBuilder + from .text.text_request_builder import TextRequestBuilder + from .time.time_request_builder import TimeRequestBuilder + from .timevalue.timevalue_request_builder import TimevalueRequestBuilder + from .today.today_request_builder import TodayRequestBuilder + from .trim.trim_request_builder import TrimRequestBuilder + from .trim_mean.trim_mean_request_builder import TrimMeanRequestBuilder + from .true_.true_request_builder import TrueRequestBuilder + from .trunc.trunc_request_builder import TruncRequestBuilder + from .type.type_request_builder import TypeRequestBuilder + from .t_dist.t_dist_request_builder import T_DistRequestBuilder + from .t_dist_2_t.t_dist_2_t_request_builder import T_Dist_2TRequestBuilder + from .t_dist_r_t.t_dist_r_t_request_builder import T_Dist_RTRequestBuilder + from .t_inv.t_inv_request_builder import T_InvRequestBuilder + from .t_inv_2_t.t_inv_2_t_request_builder import T_Inv_2TRequestBuilder + from .unichar.unichar_request_builder import UnicharRequestBuilder + from .unicode.unicode_request_builder import UnicodeRequestBuilder + from .upper.upper_request_builder import UpperRequestBuilder + from .usdollar.usdollar_request_builder import UsdollarRequestBuilder + from .value.value_request_builder import ValueRequestBuilder + from .var_a.var_a_request_builder import VarARequestBuilder + from .var_p.var_p_request_builder import Var_PRequestBuilder + from .var_p_a.var_p_a_request_builder import VarPARequestBuilder + from .var_s.var_s_request_builder import Var_SRequestBuilder + from .vdb.vdb_request_builder import VdbRequestBuilder + from .vlookup.vlookup_request_builder import VlookupRequestBuilder + from .weekday.weekday_request_builder import WeekdayRequestBuilder + from .week_num.week_num_request_builder import WeekNumRequestBuilder + from .weibull_dist.weibull_dist_request_builder import Weibull_DistRequestBuilder + from .work_day.work_day_request_builder import WorkDayRequestBuilder + from .work_day_intl.work_day_intl_request_builder import WorkDay_IntlRequestBuilder + from .xirr.xirr_request_builder import XirrRequestBuilder + from .xnpv.xnpv_request_builder import XnpvRequestBuilder + from .xor.xor_request_builder import XorRequestBuilder + from .year.year_request_builder import YearRequestBuilder + from .year_frac.year_frac_request_builder import YearFracRequestBuilder + from .yield_.yield_request_builder import YieldRequestBuilder + from .yield_disc.yield_disc_request_builder import YieldDiscRequestBuilder + from .yield_mat.yield_mat_request_builder import YieldMatRequestBuilder + from .z_test.z_test_request_builder import Z_TestRequestBuilder + +class FunctionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the functions property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FunctionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property functions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FunctionsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookFunctions]: + """ + Get functions from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctions] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_functions import WorkbookFunctions + + return await self.request_adapter.send_async(request_info, WorkbookFunctions, error_mapping) + + async def patch(self,body: WorkbookFunctions, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctions]: + """ + Update the navigation property functions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctions] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_functions import WorkbookFunctions + + return await self.request_adapter.send_async(request_info, WorkbookFunctions, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property functions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FunctionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get functions from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookFunctions, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property functions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FunctionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FunctionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FunctionsRequestBuilder(self.request_adapter, raw_url) + + @property + def abs(self) -> AbsRequestBuilder: + """ + Provides operations to call the abs method. + """ + from .abs.abs_request_builder import AbsRequestBuilder + + return AbsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def accr_int(self) -> AccrIntRequestBuilder: + """ + Provides operations to call the accrInt method. + """ + from .accr_int.accr_int_request_builder import AccrIntRequestBuilder + + return AccrIntRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def accr_int_m(self) -> AccrIntMRequestBuilder: + """ + Provides operations to call the accrIntM method. + """ + from .accr_int_m.accr_int_m_request_builder import AccrIntMRequestBuilder + + return AccrIntMRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def acos(self) -> AcosRequestBuilder: + """ + Provides operations to call the acos method. + """ + from .acos.acos_request_builder import AcosRequestBuilder + + return AcosRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def acosh(self) -> AcoshRequestBuilder: + """ + Provides operations to call the acosh method. + """ + from .acosh.acosh_request_builder import AcoshRequestBuilder + + return AcoshRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def acot(self) -> AcotRequestBuilder: + """ + Provides operations to call the acot method. + """ + from .acot.acot_request_builder import AcotRequestBuilder + + return AcotRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def acoth(self) -> AcothRequestBuilder: + """ + Provides operations to call the acoth method. + """ + from .acoth.acoth_request_builder import AcothRequestBuilder + + return AcothRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def amor_degrc(self) -> AmorDegrcRequestBuilder: + """ + Provides operations to call the amorDegrc method. + """ + from .amor_degrc.amor_degrc_request_builder import AmorDegrcRequestBuilder + + return AmorDegrcRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def amor_linc(self) -> AmorLincRequestBuilder: + """ + Provides operations to call the amorLinc method. + """ + from .amor_linc.amor_linc_request_builder import AmorLincRequestBuilder + + return AmorLincRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def and_(self) -> AndRequestBuilder: + """ + Provides operations to call the and method. + """ + from .and_.and_request_builder import AndRequestBuilder + + return AndRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def arabic(self) -> ArabicRequestBuilder: + """ + Provides operations to call the arabic method. + """ + from .arabic.arabic_request_builder import ArabicRequestBuilder + + return ArabicRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def areas(self) -> AreasRequestBuilder: + """ + Provides operations to call the areas method. + """ + from .areas.areas_request_builder import AreasRequestBuilder + + return AreasRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def asc(self) -> AscRequestBuilder: + """ + Provides operations to call the asc method. + """ + from .asc.asc_request_builder import AscRequestBuilder + + return AscRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def asin(self) -> AsinRequestBuilder: + """ + Provides operations to call the asin method. + """ + from .asin.asin_request_builder import AsinRequestBuilder + + return AsinRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def asinh(self) -> AsinhRequestBuilder: + """ + Provides operations to call the asinh method. + """ + from .asinh.asinh_request_builder import AsinhRequestBuilder + + return AsinhRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def atan(self) -> AtanRequestBuilder: + """ + Provides operations to call the atan method. + """ + from .atan.atan_request_builder import AtanRequestBuilder + + return AtanRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def atan2(self) -> Atan2RequestBuilder: + """ + Provides operations to call the atan2 method. + """ + from .atan2.atan2_request_builder import Atan2RequestBuilder + + return Atan2RequestBuilder(self.request_adapter, self.path_parameters) + + @property + def atanh(self) -> AtanhRequestBuilder: + """ + Provides operations to call the atanh method. + """ + from .atanh.atanh_request_builder import AtanhRequestBuilder + + return AtanhRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ave_dev(self) -> AveDevRequestBuilder: + """ + Provides operations to call the aveDev method. + """ + from .ave_dev.ave_dev_request_builder import AveDevRequestBuilder + + return AveDevRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def average(self) -> AverageRequestBuilder: + """ + Provides operations to call the average method. + """ + from .average.average_request_builder import AverageRequestBuilder + + return AverageRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def average_a(self) -> AverageARequestBuilder: + """ + Provides operations to call the averageA method. + """ + from .average_a.average_a_request_builder import AverageARequestBuilder + + return AverageARequestBuilder(self.request_adapter, self.path_parameters) + + @property + def average_if(self) -> AverageIfRequestBuilder: + """ + Provides operations to call the averageIf method. + """ + from .average_if.average_if_request_builder import AverageIfRequestBuilder + + return AverageIfRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def average_ifs(self) -> AverageIfsRequestBuilder: + """ + Provides operations to call the averageIfs method. + """ + from .average_ifs.average_ifs_request_builder import AverageIfsRequestBuilder + + return AverageIfsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def baht_text(self) -> BahtTextRequestBuilder: + """ + Provides operations to call the bahtText method. + """ + from .baht_text.baht_text_request_builder import BahtTextRequestBuilder + + return BahtTextRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def base(self) -> BaseRequestBuilder_: + """ + Provides operations to call the base method. + """ + from .base.base_request_builder_ import BaseRequestBuilder_ + + return BaseRequestBuilder_(self.request_adapter, self.path_parameters) + + @property + def bessel_i(self) -> BesselIRequestBuilder: + """ + Provides operations to call the besselI method. + """ + from .bessel_i.bessel_i_request_builder import BesselIRequestBuilder + + return BesselIRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bessel_j(self) -> BesselJRequestBuilder: + """ + Provides operations to call the besselJ method. + """ + from .bessel_j.bessel_j_request_builder import BesselJRequestBuilder + + return BesselJRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bessel_k(self) -> BesselKRequestBuilder: + """ + Provides operations to call the besselK method. + """ + from .bessel_k.bessel_k_request_builder import BesselKRequestBuilder + + return BesselKRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bessel_y(self) -> BesselYRequestBuilder: + """ + Provides operations to call the besselY method. + """ + from .bessel_y.bessel_y_request_builder import BesselYRequestBuilder + + return BesselYRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def beta_dist(self) -> Beta_DistRequestBuilder: + """ + Provides operations to call the beta_Dist method. + """ + from .beta_dist.beta_dist_request_builder import Beta_DistRequestBuilder + + return Beta_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def beta_inv(self) -> Beta_InvRequestBuilder: + """ + Provides operations to call the beta_Inv method. + """ + from .beta_inv.beta_inv_request_builder import Beta_InvRequestBuilder + + return Beta_InvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bin2_dec(self) -> Bin2DecRequestBuilder: + """ + Provides operations to call the bin2Dec method. + """ + from .bin2_dec.bin2_dec_request_builder import Bin2DecRequestBuilder + + return Bin2DecRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bin2_hex(self) -> Bin2HexRequestBuilder: + """ + Provides operations to call the bin2Hex method. + """ + from .bin2_hex.bin2_hex_request_builder import Bin2HexRequestBuilder + + return Bin2HexRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bin2_oct(self) -> Bin2OctRequestBuilder: + """ + Provides operations to call the bin2Oct method. + """ + from .bin2_oct.bin2_oct_request_builder import Bin2OctRequestBuilder + + return Bin2OctRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def binom_dist(self) -> Binom_DistRequestBuilder: + """ + Provides operations to call the binom_Dist method. + """ + from .binom_dist.binom_dist_request_builder import Binom_DistRequestBuilder + + return Binom_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def binom_dist_range(self) -> Binom_Dist_RangeRequestBuilder: + """ + Provides operations to call the binom_Dist_Range method. + """ + from .binom_dist_range.binom_dist_range_request_builder import Binom_Dist_RangeRequestBuilder + + return Binom_Dist_RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def binom_inv(self) -> Binom_InvRequestBuilder: + """ + Provides operations to call the binom_Inv method. + """ + from .binom_inv.binom_inv_request_builder import Binom_InvRequestBuilder + + return Binom_InvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bitand(self) -> BitandRequestBuilder: + """ + Provides operations to call the bitand method. + """ + from .bitand.bitand_request_builder import BitandRequestBuilder + + return BitandRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bitlshift(self) -> BitlshiftRequestBuilder: + """ + Provides operations to call the bitlshift method. + """ + from .bitlshift.bitlshift_request_builder import BitlshiftRequestBuilder + + return BitlshiftRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bitor(self) -> BitorRequestBuilder: + """ + Provides operations to call the bitor method. + """ + from .bitor.bitor_request_builder import BitorRequestBuilder + + return BitorRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bitrshift(self) -> BitrshiftRequestBuilder: + """ + Provides operations to call the bitrshift method. + """ + from .bitrshift.bitrshift_request_builder import BitrshiftRequestBuilder + + return BitrshiftRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def bitxor(self) -> BitxorRequestBuilder: + """ + Provides operations to call the bitxor method. + """ + from .bitxor.bitxor_request_builder import BitxorRequestBuilder + + return BitxorRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ceiling_math(self) -> Ceiling_MathRequestBuilder: + """ + Provides operations to call the ceiling_Math method. + """ + from .ceiling_math.ceiling_math_request_builder import Ceiling_MathRequestBuilder + + return Ceiling_MathRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ceiling_precise(self) -> Ceiling_PreciseRequestBuilder: + """ + Provides operations to call the ceiling_Precise method. + """ + from .ceiling_precise.ceiling_precise_request_builder import Ceiling_PreciseRequestBuilder + + return Ceiling_PreciseRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def char(self) -> CharRequestBuilder: + """ + Provides operations to call the char method. + """ + from .char.char_request_builder import CharRequestBuilder + + return CharRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def chi_sq_dist(self) -> ChiSq_DistRequestBuilder: + """ + Provides operations to call the chiSq_Dist method. + """ + from .chi_sq_dist.chi_sq_dist_request_builder import ChiSq_DistRequestBuilder + + return ChiSq_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def chi_sq_dist_r_t(self) -> ChiSq_Dist_RTRequestBuilder: + """ + Provides operations to call the chiSq_Dist_RT method. + """ + from .chi_sq_dist_r_t.chi_sq_dist_r_t_request_builder import ChiSq_Dist_RTRequestBuilder + + return ChiSq_Dist_RTRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def chi_sq_inv(self) -> ChiSq_InvRequestBuilder: + """ + Provides operations to call the chiSq_Inv method. + """ + from .chi_sq_inv.chi_sq_inv_request_builder import ChiSq_InvRequestBuilder + + return ChiSq_InvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def chi_sq_inv_r_t(self) -> ChiSq_Inv_RTRequestBuilder: + """ + Provides operations to call the chiSq_Inv_RT method. + """ + from .chi_sq_inv_r_t.chi_sq_inv_r_t_request_builder import ChiSq_Inv_RTRequestBuilder + + return ChiSq_Inv_RTRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def choose(self) -> ChooseRequestBuilder: + """ + Provides operations to call the choose method. + """ + from .choose.choose_request_builder import ChooseRequestBuilder + + return ChooseRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def clean(self) -> CleanRequestBuilder: + """ + Provides operations to call the clean method. + """ + from .clean.clean_request_builder import CleanRequestBuilder + + return CleanRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def code(self) -> CodeRequestBuilder: + """ + Provides operations to call the code method. + """ + from .code.code_request_builder import CodeRequestBuilder + + return CodeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to call the columns method. + """ + from .columns.columns_request_builder import ColumnsRequestBuilder + + return ColumnsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def combin(self) -> CombinRequestBuilder: + """ + Provides operations to call the combin method. + """ + from .combin.combin_request_builder import CombinRequestBuilder + + return CombinRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def combina(self) -> CombinaRequestBuilder: + """ + Provides operations to call the combina method. + """ + from .combina.combina_request_builder import CombinaRequestBuilder + + return CombinaRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def complex(self) -> ComplexRequestBuilder: + """ + Provides operations to call the complex method. + """ + from .complex.complex_request_builder import ComplexRequestBuilder + + return ComplexRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def concatenate(self) -> ConcatenateRequestBuilder: + """ + Provides operations to call the concatenate method. + """ + from .concatenate.concatenate_request_builder import ConcatenateRequestBuilder + + return ConcatenateRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def confidence_norm(self) -> Confidence_NormRequestBuilder: + """ + Provides operations to call the confidence_Norm method. + """ + from .confidence_norm.confidence_norm_request_builder import Confidence_NormRequestBuilder + + return Confidence_NormRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def confidence_t(self) -> Confidence_TRequestBuilder: + """ + Provides operations to call the confidence_T method. + """ + from .confidence_t.confidence_t_request_builder import Confidence_TRequestBuilder + + return Confidence_TRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def convert(self) -> ConvertRequestBuilder: + """ + Provides operations to call the convert method. + """ + from .convert.convert_request_builder import ConvertRequestBuilder + + return ConvertRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def cos(self) -> CosRequestBuilder: + """ + Provides operations to call the cos method. + """ + from .cos.cos_request_builder import CosRequestBuilder + + return CosRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def cosh(self) -> CoshRequestBuilder: + """ + Provides operations to call the cosh method. + """ + from .cosh.cosh_request_builder import CoshRequestBuilder + + return CoshRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def cot(self) -> CotRequestBuilder: + """ + Provides operations to call the cot method. + """ + from .cot.cot_request_builder import CotRequestBuilder + + return CotRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def coth(self) -> CothRequestBuilder: + """ + Provides operations to call the coth method. + """ + from .coth.coth_request_builder import CothRequestBuilder + + return CothRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to call the count method. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count_a(self) -> CountARequestBuilder: + """ + Provides operations to call the countA method. + """ + from .count_a.count_a_request_builder import CountARequestBuilder + + return CountARequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count_blank(self) -> CountBlankRequestBuilder: + """ + Provides operations to call the countBlank method. + """ + from .count_blank.count_blank_request_builder import CountBlankRequestBuilder + + return CountBlankRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count_if(self) -> CountIfRequestBuilder: + """ + Provides operations to call the countIf method. + """ + from .count_if.count_if_request_builder import CountIfRequestBuilder + + return CountIfRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count_ifs(self) -> CountIfsRequestBuilder: + """ + Provides operations to call the countIfs method. + """ + from .count_ifs.count_ifs_request_builder import CountIfsRequestBuilder + + return CountIfsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def coup_day_bs(self) -> CoupDayBsRequestBuilder: + """ + Provides operations to call the coupDayBs method. + """ + from .coup_day_bs.coup_day_bs_request_builder import CoupDayBsRequestBuilder + + return CoupDayBsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def coup_days(self) -> CoupDaysRequestBuilder: + """ + Provides operations to call the coupDays method. + """ + from .coup_days.coup_days_request_builder import CoupDaysRequestBuilder + + return CoupDaysRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def coup_days_nc(self) -> CoupDaysNcRequestBuilder: + """ + Provides operations to call the coupDaysNc method. + """ + from .coup_days_nc.coup_days_nc_request_builder import CoupDaysNcRequestBuilder + + return CoupDaysNcRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def coup_ncd(self) -> CoupNcdRequestBuilder: + """ + Provides operations to call the coupNcd method. + """ + from .coup_ncd.coup_ncd_request_builder import CoupNcdRequestBuilder + + return CoupNcdRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def coup_num(self) -> CoupNumRequestBuilder: + """ + Provides operations to call the coupNum method. + """ + from .coup_num.coup_num_request_builder import CoupNumRequestBuilder + + return CoupNumRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def coup_pcd(self) -> CoupPcdRequestBuilder: + """ + Provides operations to call the coupPcd method. + """ + from .coup_pcd.coup_pcd_request_builder import CoupPcdRequestBuilder + + return CoupPcdRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def csc(self) -> CscRequestBuilder: + """ + Provides operations to call the csc method. + """ + from .csc.csc_request_builder import CscRequestBuilder + + return CscRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def csch(self) -> CschRequestBuilder: + """ + Provides operations to call the csch method. + """ + from .csch.csch_request_builder import CschRequestBuilder + + return CschRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def cum_i_pmt(self) -> CumIPmtRequestBuilder: + """ + Provides operations to call the cumIPmt method. + """ + from .cum_i_pmt.cum_i_pmt_request_builder import CumIPmtRequestBuilder + + return CumIPmtRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def cum_princ(self) -> CumPrincRequestBuilder: + """ + Provides operations to call the cumPrinc method. + """ + from .cum_princ.cum_princ_request_builder import CumPrincRequestBuilder + + return CumPrincRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def date(self) -> DateRequestBuilder: + """ + Provides operations to call the date method. + """ + from .date.date_request_builder import DateRequestBuilder + + return DateRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def datevalue(self) -> DatevalueRequestBuilder: + """ + Provides operations to call the datevalue method. + """ + from .datevalue.datevalue_request_builder import DatevalueRequestBuilder + + return DatevalueRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def daverage(self) -> DaverageRequestBuilder: + """ + Provides operations to call the daverage method. + """ + from .daverage.daverage_request_builder import DaverageRequestBuilder + + return DaverageRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def day(self) -> DayRequestBuilder: + """ + Provides operations to call the day method. + """ + from .day.day_request_builder import DayRequestBuilder + + return DayRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def days(self) -> DaysRequestBuilder: + """ + Provides operations to call the days method. + """ + from .days.days_request_builder import DaysRequestBuilder + + return DaysRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def days360(self) -> Days360RequestBuilder: + """ + Provides operations to call the days360 method. + """ + from .days360.days360_request_builder import Days360RequestBuilder + + return Days360RequestBuilder(self.request_adapter, self.path_parameters) + + @property + def db(self) -> DbRequestBuilder: + """ + Provides operations to call the db method. + """ + from .db.db_request_builder import DbRequestBuilder + + return DbRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dbcs(self) -> DbcsRequestBuilder: + """ + Provides operations to call the dbcs method. + """ + from .dbcs.dbcs_request_builder import DbcsRequestBuilder + + return DbcsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dcount(self) -> DcountRequestBuilder: + """ + Provides operations to call the dcount method. + """ + from .dcount.dcount_request_builder import DcountRequestBuilder + + return DcountRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dcount_a(self) -> DcountARequestBuilder: + """ + Provides operations to call the dcountA method. + """ + from .dcount_a.dcount_a_request_builder import DcountARequestBuilder + + return DcountARequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ddb(self) -> DdbRequestBuilder: + """ + Provides operations to call the ddb method. + """ + from .ddb.ddb_request_builder import DdbRequestBuilder + + return DdbRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dec2_bin(self) -> Dec2BinRequestBuilder: + """ + Provides operations to call the dec2Bin method. + """ + from .dec2_bin.dec2_bin_request_builder import Dec2BinRequestBuilder + + return Dec2BinRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dec2_hex(self) -> Dec2HexRequestBuilder: + """ + Provides operations to call the dec2Hex method. + """ + from .dec2_hex.dec2_hex_request_builder import Dec2HexRequestBuilder + + return Dec2HexRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dec2_oct(self) -> Dec2OctRequestBuilder: + """ + Provides operations to call the dec2Oct method. + """ + from .dec2_oct.dec2_oct_request_builder import Dec2OctRequestBuilder + + return Dec2OctRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def decimal(self) -> DecimalRequestBuilder: + """ + Provides operations to call the decimal method. + """ + from .decimal.decimal_request_builder import DecimalRequestBuilder + + return DecimalRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def degrees(self) -> DegreesRequestBuilder: + """ + Provides operations to call the degrees method. + """ + from .degrees.degrees_request_builder import DegreesRequestBuilder + + return DegreesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def delta(self) -> DeltaRequestBuilder: + """ + Provides operations to call the delta method. + """ + from .delta.delta_request_builder import DeltaRequestBuilder + + return DeltaRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dev_sq(self) -> DevSqRequestBuilder: + """ + Provides operations to call the devSq method. + """ + from .dev_sq.dev_sq_request_builder import DevSqRequestBuilder + + return DevSqRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dget(self) -> DgetRequestBuilder: + """ + Provides operations to call the dget method. + """ + from .dget.dget_request_builder import DgetRequestBuilder + + return DgetRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def disc(self) -> DiscRequestBuilder: + """ + Provides operations to call the disc method. + """ + from .disc.disc_request_builder import DiscRequestBuilder + + return DiscRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dmax(self) -> DmaxRequestBuilder: + """ + Provides operations to call the dmax method. + """ + from .dmax.dmax_request_builder import DmaxRequestBuilder + + return DmaxRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dmin(self) -> DminRequestBuilder: + """ + Provides operations to call the dmin method. + """ + from .dmin.dmin_request_builder import DminRequestBuilder + + return DminRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dollar(self) -> DollarRequestBuilder: + """ + Provides operations to call the dollar method. + """ + from .dollar.dollar_request_builder import DollarRequestBuilder + + return DollarRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dollar_de(self) -> DollarDeRequestBuilder: + """ + Provides operations to call the dollarDe method. + """ + from .dollar_de.dollar_de_request_builder import DollarDeRequestBuilder + + return DollarDeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dollar_fr(self) -> DollarFrRequestBuilder: + """ + Provides operations to call the dollarFr method. + """ + from .dollar_fr.dollar_fr_request_builder import DollarFrRequestBuilder + + return DollarFrRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dproduct(self) -> DproductRequestBuilder: + """ + Provides operations to call the dproduct method. + """ + from .dproduct.dproduct_request_builder import DproductRequestBuilder + + return DproductRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dst_dev(self) -> DstDevRequestBuilder: + """ + Provides operations to call the dstDev method. + """ + from .dst_dev.dst_dev_request_builder import DstDevRequestBuilder + + return DstDevRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dst_dev_p(self) -> DstDevPRequestBuilder: + """ + Provides operations to call the dstDevP method. + """ + from .dst_dev_p.dst_dev_p_request_builder import DstDevPRequestBuilder + + return DstDevPRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dsum(self) -> DsumRequestBuilder: + """ + Provides operations to call the dsum method. + """ + from .dsum.dsum_request_builder import DsumRequestBuilder + + return DsumRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def duration(self) -> DurationRequestBuilder: + """ + Provides operations to call the duration method. + """ + from .duration.duration_request_builder import DurationRequestBuilder + + return DurationRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dvar(self) -> DvarRequestBuilder: + """ + Provides operations to call the dvar method. + """ + from .dvar.dvar_request_builder import DvarRequestBuilder + + return DvarRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def dvar_p(self) -> DvarPRequestBuilder: + """ + Provides operations to call the dvarP method. + """ + from .dvar_p.dvar_p_request_builder import DvarPRequestBuilder + + return DvarPRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ecma_ceiling(self) -> Ecma_CeilingRequestBuilder: + """ + Provides operations to call the ecma_Ceiling method. + """ + from .ecma_ceiling.ecma_ceiling_request_builder import Ecma_CeilingRequestBuilder + + return Ecma_CeilingRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def edate(self) -> EdateRequestBuilder: + """ + Provides operations to call the edate method. + """ + from .edate.edate_request_builder import EdateRequestBuilder + + return EdateRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def effect(self) -> EffectRequestBuilder: + """ + Provides operations to call the effect method. + """ + from .effect.effect_request_builder import EffectRequestBuilder + + return EffectRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def eo_month(self) -> EoMonthRequestBuilder: + """ + Provides operations to call the eoMonth method. + """ + from .eo_month.eo_month_request_builder import EoMonthRequestBuilder + + return EoMonthRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def erf(self) -> ErfRequestBuilder: + """ + Provides operations to call the erf method. + """ + from .erf.erf_request_builder import ErfRequestBuilder + + return ErfRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def erf_c(self) -> ErfCRequestBuilder: + """ + Provides operations to call the erfC method. + """ + from .erf_c.erf_c_request_builder import ErfCRequestBuilder + + return ErfCRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def erf_c_precise(self) -> ErfC_PreciseRequestBuilder: + """ + Provides operations to call the erfC_Precise method. + """ + from .erf_c_precise.erf_c_precise_request_builder import ErfC_PreciseRequestBuilder + + return ErfC_PreciseRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def erf_precise(self) -> Erf_PreciseRequestBuilder: + """ + Provides operations to call the erf_Precise method. + """ + from .erf_precise.erf_precise_request_builder import Erf_PreciseRequestBuilder + + return Erf_PreciseRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def error_type(self) -> Error_TypeRequestBuilder: + """ + Provides operations to call the error_Type method. + """ + from .error_type.error_type_request_builder import Error_TypeRequestBuilder + + return Error_TypeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def even(self) -> EvenRequestBuilder: + """ + Provides operations to call the even method. + """ + from .even.even_request_builder import EvenRequestBuilder + + return EvenRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def exact(self) -> ExactRequestBuilder: + """ + Provides operations to call the exact method. + """ + from .exact.exact_request_builder import ExactRequestBuilder + + return ExactRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def exp(self) -> ExpRequestBuilder: + """ + Provides operations to call the exp method. + """ + from .exp.exp_request_builder import ExpRequestBuilder + + return ExpRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def expon_dist(self) -> Expon_DistRequestBuilder: + """ + Provides operations to call the expon_Dist method. + """ + from .expon_dist.expon_dist_request_builder import Expon_DistRequestBuilder + + return Expon_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def f_dist(self) -> F_DistRequestBuilder: + """ + Provides operations to call the f_Dist method. + """ + from .f_dist.f_dist_request_builder import F_DistRequestBuilder + + return F_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def f_dist_r_t(self) -> F_Dist_RTRequestBuilder: + """ + Provides operations to call the f_Dist_RT method. + """ + from .f_dist_r_t.f_dist_r_t_request_builder import F_Dist_RTRequestBuilder + + return F_Dist_RTRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def f_inv(self) -> F_InvRequestBuilder: + """ + Provides operations to call the f_Inv method. + """ + from .f_inv.f_inv_request_builder import F_InvRequestBuilder + + return F_InvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def f_inv_r_t(self) -> F_Inv_RTRequestBuilder: + """ + Provides operations to call the f_Inv_RT method. + """ + from .f_inv_r_t.f_inv_r_t_request_builder import F_Inv_RTRequestBuilder + + return F_Inv_RTRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def fact(self) -> FactRequestBuilder: + """ + Provides operations to call the fact method. + """ + from .fact.fact_request_builder import FactRequestBuilder + + return FactRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def fact_double(self) -> FactDoubleRequestBuilder: + """ + Provides operations to call the factDouble method. + """ + from .fact_double.fact_double_request_builder import FactDoubleRequestBuilder + + return FactDoubleRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def false_(self) -> FalseRequestBuilder: + """ + Provides operations to call the false method. + """ + from .false_.false_request_builder import FalseRequestBuilder + + return FalseRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def find(self) -> FindRequestBuilder: + """ + Provides operations to call the find method. + """ + from .find.find_request_builder import FindRequestBuilder + + return FindRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def find_b(self) -> FindBRequestBuilder: + """ + Provides operations to call the findB method. + """ + from .find_b.find_b_request_builder import FindBRequestBuilder + + return FindBRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def fisher(self) -> FisherRequestBuilder: + """ + Provides operations to call the fisher method. + """ + from .fisher.fisher_request_builder import FisherRequestBuilder + + return FisherRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def fisher_inv(self) -> FisherInvRequestBuilder: + """ + Provides operations to call the fisherInv method. + """ + from .fisher_inv.fisher_inv_request_builder import FisherInvRequestBuilder + + return FisherInvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def fixed(self) -> FixedRequestBuilder: + """ + Provides operations to call the fixed method. + """ + from .fixed.fixed_request_builder import FixedRequestBuilder + + return FixedRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def floor_math(self) -> Floor_MathRequestBuilder: + """ + Provides operations to call the floor_Math method. + """ + from .floor_math.floor_math_request_builder import Floor_MathRequestBuilder + + return Floor_MathRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def floor_precise(self) -> Floor_PreciseRequestBuilder: + """ + Provides operations to call the floor_Precise method. + """ + from .floor_precise.floor_precise_request_builder import Floor_PreciseRequestBuilder + + return Floor_PreciseRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def fv(self) -> FvRequestBuilder: + """ + Provides operations to call the fv method. + """ + from .fv.fv_request_builder import FvRequestBuilder + + return FvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def fvschedule(self) -> FvscheduleRequestBuilder: + """ + Provides operations to call the fvschedule method. + """ + from .fvschedule.fvschedule_request_builder import FvscheduleRequestBuilder + + return FvscheduleRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def gamma(self) -> GammaRequestBuilder: + """ + Provides operations to call the gamma method. + """ + from .gamma.gamma_request_builder import GammaRequestBuilder + + return GammaRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def gamma_dist(self) -> Gamma_DistRequestBuilder: + """ + Provides operations to call the gamma_Dist method. + """ + from .gamma_dist.gamma_dist_request_builder import Gamma_DistRequestBuilder + + return Gamma_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def gamma_inv(self) -> Gamma_InvRequestBuilder: + """ + Provides operations to call the gamma_Inv method. + """ + from .gamma_inv.gamma_inv_request_builder import Gamma_InvRequestBuilder + + return Gamma_InvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def gamma_ln(self) -> GammaLnRequestBuilder: + """ + Provides operations to call the gammaLn method. + """ + from .gamma_ln.gamma_ln_request_builder import GammaLnRequestBuilder + + return GammaLnRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def gamma_ln_precise(self) -> GammaLn_PreciseRequestBuilder: + """ + Provides operations to call the gammaLn_Precise method. + """ + from .gamma_ln_precise.gamma_ln_precise_request_builder import GammaLn_PreciseRequestBuilder + + return GammaLn_PreciseRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def gauss(self) -> GaussRequestBuilder: + """ + Provides operations to call the gauss method. + """ + from .gauss.gauss_request_builder import GaussRequestBuilder + + return GaussRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def gcd(self) -> GcdRequestBuilder: + """ + Provides operations to call the gcd method. + """ + from .gcd.gcd_request_builder import GcdRequestBuilder + + return GcdRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ge_step(self) -> GeStepRequestBuilder: + """ + Provides operations to call the geStep method. + """ + from .ge_step.ge_step_request_builder import GeStepRequestBuilder + + return GeStepRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def geo_mean(self) -> GeoMeanRequestBuilder: + """ + Provides operations to call the geoMean method. + """ + from .geo_mean.geo_mean_request_builder import GeoMeanRequestBuilder + + return GeoMeanRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def har_mean(self) -> HarMeanRequestBuilder: + """ + Provides operations to call the harMean method. + """ + from .har_mean.har_mean_request_builder import HarMeanRequestBuilder + + return HarMeanRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def hex2_bin(self) -> Hex2BinRequestBuilder: + """ + Provides operations to call the hex2Bin method. + """ + from .hex2_bin.hex2_bin_request_builder import Hex2BinRequestBuilder + + return Hex2BinRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def hex2_dec(self) -> Hex2DecRequestBuilder: + """ + Provides operations to call the hex2Dec method. + """ + from .hex2_dec.hex2_dec_request_builder import Hex2DecRequestBuilder + + return Hex2DecRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def hex2_oct(self) -> Hex2OctRequestBuilder: + """ + Provides operations to call the hex2Oct method. + """ + from .hex2_oct.hex2_oct_request_builder import Hex2OctRequestBuilder + + return Hex2OctRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def hlookup(self) -> HlookupRequestBuilder: + """ + Provides operations to call the hlookup method. + """ + from .hlookup.hlookup_request_builder import HlookupRequestBuilder + + return HlookupRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def hour(self) -> HourRequestBuilder: + """ + Provides operations to call the hour method. + """ + from .hour.hour_request_builder import HourRequestBuilder + + return HourRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def hyp_geom_dist(self) -> HypGeom_DistRequestBuilder: + """ + Provides operations to call the hypGeom_Dist method. + """ + from .hyp_geom_dist.hyp_geom_dist_request_builder import HypGeom_DistRequestBuilder + + return HypGeom_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def hyperlink(self) -> HyperlinkRequestBuilder: + """ + Provides operations to call the hyperlink method. + """ + from .hyperlink.hyperlink_request_builder import HyperlinkRequestBuilder + + return HyperlinkRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def if_(self) -> IfRequestBuilder: + """ + Provides operations to call the if method. + """ + from .if_.if_request_builder import IfRequestBuilder + + return IfRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_abs(self) -> ImAbsRequestBuilder: + """ + Provides operations to call the imAbs method. + """ + from .im_abs.im_abs_request_builder import ImAbsRequestBuilder + + return ImAbsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_argument(self) -> ImArgumentRequestBuilder: + """ + Provides operations to call the imArgument method. + """ + from .im_argument.im_argument_request_builder import ImArgumentRequestBuilder + + return ImArgumentRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_conjugate(self) -> ImConjugateRequestBuilder: + """ + Provides operations to call the imConjugate method. + """ + from .im_conjugate.im_conjugate_request_builder import ImConjugateRequestBuilder + + return ImConjugateRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_cos(self) -> ImCosRequestBuilder: + """ + Provides operations to call the imCos method. + """ + from .im_cos.im_cos_request_builder import ImCosRequestBuilder + + return ImCosRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_cosh(self) -> ImCoshRequestBuilder: + """ + Provides operations to call the imCosh method. + """ + from .im_cosh.im_cosh_request_builder import ImCoshRequestBuilder + + return ImCoshRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_cot(self) -> ImCotRequestBuilder: + """ + Provides operations to call the imCot method. + """ + from .im_cot.im_cot_request_builder import ImCotRequestBuilder + + return ImCotRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_csc(self) -> ImCscRequestBuilder: + """ + Provides operations to call the imCsc method. + """ + from .im_csc.im_csc_request_builder import ImCscRequestBuilder + + return ImCscRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_csch(self) -> ImCschRequestBuilder: + """ + Provides operations to call the imCsch method. + """ + from .im_csch.im_csch_request_builder import ImCschRequestBuilder + + return ImCschRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_div(self) -> ImDivRequestBuilder: + """ + Provides operations to call the imDiv method. + """ + from .im_div.im_div_request_builder import ImDivRequestBuilder + + return ImDivRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_exp(self) -> ImExpRequestBuilder: + """ + Provides operations to call the imExp method. + """ + from .im_exp.im_exp_request_builder import ImExpRequestBuilder + + return ImExpRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_ln(self) -> ImLnRequestBuilder: + """ + Provides operations to call the imLn method. + """ + from .im_ln.im_ln_request_builder import ImLnRequestBuilder + + return ImLnRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_log10(self) -> ImLog10RequestBuilder: + """ + Provides operations to call the imLog10 method. + """ + from .im_log10.im_log10_request_builder import ImLog10RequestBuilder + + return ImLog10RequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_log2(self) -> ImLog2RequestBuilder: + """ + Provides operations to call the imLog2 method. + """ + from .im_log2.im_log2_request_builder import ImLog2RequestBuilder + + return ImLog2RequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_power(self) -> ImPowerRequestBuilder: + """ + Provides operations to call the imPower method. + """ + from .im_power.im_power_request_builder import ImPowerRequestBuilder + + return ImPowerRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_product(self) -> ImProductRequestBuilder: + """ + Provides operations to call the imProduct method. + """ + from .im_product.im_product_request_builder import ImProductRequestBuilder + + return ImProductRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_real(self) -> ImRealRequestBuilder: + """ + Provides operations to call the imReal method. + """ + from .im_real.im_real_request_builder import ImRealRequestBuilder + + return ImRealRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_sec(self) -> ImSecRequestBuilder: + """ + Provides operations to call the imSec method. + """ + from .im_sec.im_sec_request_builder import ImSecRequestBuilder + + return ImSecRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_sech(self) -> ImSechRequestBuilder: + """ + Provides operations to call the imSech method. + """ + from .im_sech.im_sech_request_builder import ImSechRequestBuilder + + return ImSechRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_sin(self) -> ImSinRequestBuilder: + """ + Provides operations to call the imSin method. + """ + from .im_sin.im_sin_request_builder import ImSinRequestBuilder + + return ImSinRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_sinh(self) -> ImSinhRequestBuilder: + """ + Provides operations to call the imSinh method. + """ + from .im_sinh.im_sinh_request_builder import ImSinhRequestBuilder + + return ImSinhRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_sqrt(self) -> ImSqrtRequestBuilder: + """ + Provides operations to call the imSqrt method. + """ + from .im_sqrt.im_sqrt_request_builder import ImSqrtRequestBuilder + + return ImSqrtRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_sub(self) -> ImSubRequestBuilder: + """ + Provides operations to call the imSub method. + """ + from .im_sub.im_sub_request_builder import ImSubRequestBuilder + + return ImSubRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_sum(self) -> ImSumRequestBuilder: + """ + Provides operations to call the imSum method. + """ + from .im_sum.im_sum_request_builder import ImSumRequestBuilder + + return ImSumRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def im_tan(self) -> ImTanRequestBuilder: + """ + Provides operations to call the imTan method. + """ + from .im_tan.im_tan_request_builder import ImTanRequestBuilder + + return ImTanRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def imaginary(self) -> ImaginaryRequestBuilder: + """ + Provides operations to call the imaginary method. + """ + from .imaginary.imaginary_request_builder import ImaginaryRequestBuilder + + return ImaginaryRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def int(self) -> IntRequestBuilder: + """ + Provides operations to call the int method. + """ + from .int.int_request_builder import IntRequestBuilder + + return IntRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def int_rate(self) -> IntRateRequestBuilder: + """ + Provides operations to call the intRate method. + """ + from .int_rate.int_rate_request_builder import IntRateRequestBuilder + + return IntRateRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ipmt(self) -> IpmtRequestBuilder: + """ + Provides operations to call the ipmt method. + """ + from .ipmt.ipmt_request_builder import IpmtRequestBuilder + + return IpmtRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def irr(self) -> IrrRequestBuilder: + """ + Provides operations to call the irr method. + """ + from .irr.irr_request_builder import IrrRequestBuilder + + return IrrRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_err(self) -> IsErrRequestBuilder: + """ + Provides operations to call the isErr method. + """ + from .is_err.is_err_request_builder import IsErrRequestBuilder + + return IsErrRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_error(self) -> IsErrorRequestBuilder: + """ + Provides operations to call the isError method. + """ + from .is_error.is_error_request_builder import IsErrorRequestBuilder + + return IsErrorRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_even(self) -> IsEvenRequestBuilder: + """ + Provides operations to call the isEven method. + """ + from .is_even.is_even_request_builder import IsEvenRequestBuilder + + return IsEvenRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_formula(self) -> IsFormulaRequestBuilder: + """ + Provides operations to call the isFormula method. + """ + from .is_formula.is_formula_request_builder import IsFormulaRequestBuilder + + return IsFormulaRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_logical(self) -> IsLogicalRequestBuilder: + """ + Provides operations to call the isLogical method. + """ + from .is_logical.is_logical_request_builder import IsLogicalRequestBuilder + + return IsLogicalRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_n_a(self) -> IsNARequestBuilder: + """ + Provides operations to call the isNA method. + """ + from .is_n_a.is_n_a_request_builder import IsNARequestBuilder + + return IsNARequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_non_text(self) -> IsNonTextRequestBuilder: + """ + Provides operations to call the isNonText method. + """ + from .is_non_text.is_non_text_request_builder import IsNonTextRequestBuilder + + return IsNonTextRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_number(self) -> IsNumberRequestBuilder: + """ + Provides operations to call the isNumber method. + """ + from .is_number.is_number_request_builder import IsNumberRequestBuilder + + return IsNumberRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_odd(self) -> IsOddRequestBuilder: + """ + Provides operations to call the isOdd method. + """ + from .is_odd.is_odd_request_builder import IsOddRequestBuilder + + return IsOddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_text(self) -> IsTextRequestBuilder: + """ + Provides operations to call the isText method. + """ + from .is_text.is_text_request_builder import IsTextRequestBuilder + + return IsTextRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def iso_ceiling(self) -> Iso_CeilingRequestBuilder: + """ + Provides operations to call the iso_Ceiling method. + """ + from .iso_ceiling.iso_ceiling_request_builder import Iso_CeilingRequestBuilder + + return Iso_CeilingRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def iso_week_num(self) -> IsoWeekNumRequestBuilder: + """ + Provides operations to call the isoWeekNum method. + """ + from .iso_week_num.iso_week_num_request_builder import IsoWeekNumRequestBuilder + + return IsoWeekNumRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ispmt(self) -> IspmtRequestBuilder: + """ + Provides operations to call the ispmt method. + """ + from .ispmt.ispmt_request_builder import IspmtRequestBuilder + + return IspmtRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def isref(self) -> IsrefRequestBuilder: + """ + Provides operations to call the isref method. + """ + from .isref.isref_request_builder import IsrefRequestBuilder + + return IsrefRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def kurt(self) -> KurtRequestBuilder: + """ + Provides operations to call the kurt method. + """ + from .kurt.kurt_request_builder import KurtRequestBuilder + + return KurtRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def large(self) -> LargeRequestBuilder: + """ + Provides operations to call the large method. + """ + from .large.large_request_builder import LargeRequestBuilder + + return LargeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def lcm(self) -> LcmRequestBuilder: + """ + Provides operations to call the lcm method. + """ + from .lcm.lcm_request_builder import LcmRequestBuilder + + return LcmRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def left(self) -> LeftRequestBuilder: + """ + Provides operations to call the left method. + """ + from .left.left_request_builder import LeftRequestBuilder + + return LeftRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def leftb(self) -> LeftbRequestBuilder: + """ + Provides operations to call the leftb method. + """ + from .leftb.leftb_request_builder import LeftbRequestBuilder + + return LeftbRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def len(self) -> LenRequestBuilder: + """ + Provides operations to call the len method. + """ + from .len.len_request_builder import LenRequestBuilder + + return LenRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def lenb(self) -> LenbRequestBuilder: + """ + Provides operations to call the lenb method. + """ + from .lenb.lenb_request_builder import LenbRequestBuilder + + return LenbRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ln(self) -> LnRequestBuilder: + """ + Provides operations to call the ln method. + """ + from .ln.ln_request_builder import LnRequestBuilder + + return LnRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def log(self) -> LogRequestBuilder: + """ + Provides operations to call the log method. + """ + from .log.log_request_builder import LogRequestBuilder + + return LogRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def log_norm_dist(self) -> LogNorm_DistRequestBuilder: + """ + Provides operations to call the logNorm_Dist method. + """ + from .log_norm_dist.log_norm_dist_request_builder import LogNorm_DistRequestBuilder + + return LogNorm_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def log_norm_inv(self) -> LogNorm_InvRequestBuilder: + """ + Provides operations to call the logNorm_Inv method. + """ + from .log_norm_inv.log_norm_inv_request_builder import LogNorm_InvRequestBuilder + + return LogNorm_InvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def log10(self) -> Log10RequestBuilder: + """ + Provides operations to call the log10 method. + """ + from .log10.log10_request_builder import Log10RequestBuilder + + return Log10RequestBuilder(self.request_adapter, self.path_parameters) + + @property + def lookup(self) -> LookupRequestBuilder: + """ + Provides operations to call the lookup method. + """ + from .lookup.lookup_request_builder import LookupRequestBuilder + + return LookupRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def lower(self) -> LowerRequestBuilder: + """ + Provides operations to call the lower method. + """ + from .lower.lower_request_builder import LowerRequestBuilder + + return LowerRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def match(self) -> MatchRequestBuilder: + """ + Provides operations to call the match method. + """ + from .match.match_request_builder import MatchRequestBuilder + + return MatchRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def max(self) -> MaxRequestBuilder: + """ + Provides operations to call the max method. + """ + from .max.max_request_builder import MaxRequestBuilder + + return MaxRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def max_a(self) -> MaxARequestBuilder: + """ + Provides operations to call the maxA method. + """ + from .max_a.max_a_request_builder import MaxARequestBuilder + + return MaxARequestBuilder(self.request_adapter, self.path_parameters) + + @property + def mduration(self) -> MdurationRequestBuilder: + """ + Provides operations to call the mduration method. + """ + from .mduration.mduration_request_builder import MdurationRequestBuilder + + return MdurationRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def median(self) -> MedianRequestBuilder: + """ + Provides operations to call the median method. + """ + from .median.median_request_builder import MedianRequestBuilder + + return MedianRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def mid(self) -> MidRequestBuilder: + """ + Provides operations to call the mid method. + """ + from .mid.mid_request_builder import MidRequestBuilder + + return MidRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def midb(self) -> MidbRequestBuilder: + """ + Provides operations to call the midb method. + """ + from .midb.midb_request_builder import MidbRequestBuilder + + return MidbRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def min(self) -> MinRequestBuilder: + """ + Provides operations to call the min method. + """ + from .min.min_request_builder import MinRequestBuilder + + return MinRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def min_a(self) -> MinARequestBuilder: + """ + Provides operations to call the minA method. + """ + from .min_a.min_a_request_builder import MinARequestBuilder + + return MinARequestBuilder(self.request_adapter, self.path_parameters) + + @property + def minute(self) -> MinuteRequestBuilder: + """ + Provides operations to call the minute method. + """ + from .minute.minute_request_builder import MinuteRequestBuilder + + return MinuteRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def mirr(self) -> MirrRequestBuilder: + """ + Provides operations to call the mirr method. + """ + from .mirr.mirr_request_builder import MirrRequestBuilder + + return MirrRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def mod(self) -> ModRequestBuilder: + """ + Provides operations to call the mod method. + """ + from .mod.mod_request_builder import ModRequestBuilder + + return ModRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def month(self) -> MonthRequestBuilder: + """ + Provides operations to call the month method. + """ + from .month.month_request_builder import MonthRequestBuilder + + return MonthRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def mround(self) -> MroundRequestBuilder: + """ + Provides operations to call the mround method. + """ + from .mround.mround_request_builder import MroundRequestBuilder + + return MroundRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def multi_nomial(self) -> MultiNomialRequestBuilder: + """ + Provides operations to call the multiNomial method. + """ + from .multi_nomial.multi_nomial_request_builder import MultiNomialRequestBuilder + + return MultiNomialRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def n(self) -> NRequestBuilder: + """ + Provides operations to call the n method. + """ + from .n.n_request_builder import NRequestBuilder + + return NRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def na(self) -> NaRequestBuilder: + """ + Provides operations to call the na method. + """ + from .na.na_request_builder import NaRequestBuilder + + return NaRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def neg_binom_dist(self) -> NegBinom_DistRequestBuilder: + """ + Provides operations to call the negBinom_Dist method. + """ + from .neg_binom_dist.neg_binom_dist_request_builder import NegBinom_DistRequestBuilder + + return NegBinom_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def network_days(self) -> NetworkDaysRequestBuilder: + """ + Provides operations to call the networkDays method. + """ + from .network_days.network_days_request_builder import NetworkDaysRequestBuilder + + return NetworkDaysRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def network_days_intl(self) -> NetworkDays_IntlRequestBuilder: + """ + Provides operations to call the networkDays_Intl method. + """ + from .network_days_intl.network_days_intl_request_builder import NetworkDays_IntlRequestBuilder + + return NetworkDays_IntlRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def nominal(self) -> NominalRequestBuilder: + """ + Provides operations to call the nominal method. + """ + from .nominal.nominal_request_builder import NominalRequestBuilder + + return NominalRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def norm_dist(self) -> Norm_DistRequestBuilder: + """ + Provides operations to call the norm_Dist method. + """ + from .norm_dist.norm_dist_request_builder import Norm_DistRequestBuilder + + return Norm_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def norm_inv(self) -> Norm_InvRequestBuilder: + """ + Provides operations to call the norm_Inv method. + """ + from .norm_inv.norm_inv_request_builder import Norm_InvRequestBuilder + + return Norm_InvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def norm_s_dist(self) -> Norm_S_DistRequestBuilder: + """ + Provides operations to call the norm_S_Dist method. + """ + from .norm_s_dist.norm_s_dist_request_builder import Norm_S_DistRequestBuilder + + return Norm_S_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def norm_s_inv(self) -> Norm_S_InvRequestBuilder: + """ + Provides operations to call the norm_S_Inv method. + """ + from .norm_s_inv.norm_s_inv_request_builder import Norm_S_InvRequestBuilder + + return Norm_S_InvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def not_(self) -> NotRequestBuilder: + """ + Provides operations to call the not method. + """ + from .not_.not_request_builder import NotRequestBuilder + + return NotRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def now(self) -> NowRequestBuilder: + """ + Provides operations to call the now method. + """ + from .now.now_request_builder import NowRequestBuilder + + return NowRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def nper(self) -> NperRequestBuilder: + """ + Provides operations to call the nper method. + """ + from .nper.nper_request_builder import NperRequestBuilder + + return NperRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def npv(self) -> NpvRequestBuilder: + """ + Provides operations to call the npv method. + """ + from .npv.npv_request_builder import NpvRequestBuilder + + return NpvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def number_value(self) -> NumberValueRequestBuilder: + """ + Provides operations to call the numberValue method. + """ + from .number_value.number_value_request_builder import NumberValueRequestBuilder + + return NumberValueRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def oct2_bin(self) -> Oct2BinRequestBuilder: + """ + Provides operations to call the oct2Bin method. + """ + from .oct2_bin.oct2_bin_request_builder import Oct2BinRequestBuilder + + return Oct2BinRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def oct2_dec(self) -> Oct2DecRequestBuilder: + """ + Provides operations to call the oct2Dec method. + """ + from .oct2_dec.oct2_dec_request_builder import Oct2DecRequestBuilder + + return Oct2DecRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def oct2_hex(self) -> Oct2HexRequestBuilder: + """ + Provides operations to call the oct2Hex method. + """ + from .oct2_hex.oct2_hex_request_builder import Oct2HexRequestBuilder + + return Oct2HexRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def odd(self) -> OddRequestBuilder: + """ + Provides operations to call the odd method. + """ + from .odd.odd_request_builder import OddRequestBuilder + + return OddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def odd_f_price(self) -> OddFPriceRequestBuilder: + """ + Provides operations to call the oddFPrice method. + """ + from .odd_f_price.odd_f_price_request_builder import OddFPriceRequestBuilder + + return OddFPriceRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def odd_f_yield(self) -> OddFYieldRequestBuilder: + """ + Provides operations to call the oddFYield method. + """ + from .odd_f_yield.odd_f_yield_request_builder import OddFYieldRequestBuilder + + return OddFYieldRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def odd_l_price(self) -> OddLPriceRequestBuilder: + """ + Provides operations to call the oddLPrice method. + """ + from .odd_l_price.odd_l_price_request_builder import OddLPriceRequestBuilder + + return OddLPriceRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def odd_l_yield(self) -> OddLYieldRequestBuilder: + """ + Provides operations to call the oddLYield method. + """ + from .odd_l_yield.odd_l_yield_request_builder import OddLYieldRequestBuilder + + return OddLYieldRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def or_(self) -> OrRequestBuilder: + """ + Provides operations to call the or method. + """ + from .or_.or_request_builder import OrRequestBuilder + + return OrRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def pduration(self) -> PdurationRequestBuilder: + """ + Provides operations to call the pduration method. + """ + from .pduration.pduration_request_builder import PdurationRequestBuilder + + return PdurationRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def percent_rank_exc(self) -> PercentRank_ExcRequestBuilder: + """ + Provides operations to call the percentRank_Exc method. + """ + from .percent_rank_exc.percent_rank_exc_request_builder import PercentRank_ExcRequestBuilder + + return PercentRank_ExcRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def percent_rank_inc(self) -> PercentRank_IncRequestBuilder: + """ + Provides operations to call the percentRank_Inc method. + """ + from .percent_rank_inc.percent_rank_inc_request_builder import PercentRank_IncRequestBuilder + + return PercentRank_IncRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def percentile_exc(self) -> Percentile_ExcRequestBuilder: + """ + Provides operations to call the percentile_Exc method. + """ + from .percentile_exc.percentile_exc_request_builder import Percentile_ExcRequestBuilder + + return Percentile_ExcRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def percentile_inc(self) -> Percentile_IncRequestBuilder: + """ + Provides operations to call the percentile_Inc method. + """ + from .percentile_inc.percentile_inc_request_builder import Percentile_IncRequestBuilder + + return Percentile_IncRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def permut(self) -> PermutRequestBuilder: + """ + Provides operations to call the permut method. + """ + from .permut.permut_request_builder import PermutRequestBuilder + + return PermutRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def permutationa(self) -> PermutationaRequestBuilder: + """ + Provides operations to call the permutationa method. + """ + from .permutationa.permutationa_request_builder import PermutationaRequestBuilder + + return PermutationaRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def phi(self) -> PhiRequestBuilder: + """ + Provides operations to call the phi method. + """ + from .phi.phi_request_builder import PhiRequestBuilder + + return PhiRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def pi(self) -> PiRequestBuilder: + """ + Provides operations to call the pi method. + """ + from .pi.pi_request_builder import PiRequestBuilder + + return PiRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def pmt(self) -> PmtRequestBuilder: + """ + Provides operations to call the pmt method. + """ + from .pmt.pmt_request_builder import PmtRequestBuilder + + return PmtRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def poisson_dist(self) -> Poisson_DistRequestBuilder: + """ + Provides operations to call the poisson_Dist method. + """ + from .poisson_dist.poisson_dist_request_builder import Poisson_DistRequestBuilder + + return Poisson_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def power(self) -> PowerRequestBuilder: + """ + Provides operations to call the power method. + """ + from .power.power_request_builder import PowerRequestBuilder + + return PowerRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def ppmt(self) -> PpmtRequestBuilder: + """ + Provides operations to call the ppmt method. + """ + from .ppmt.ppmt_request_builder import PpmtRequestBuilder + + return PpmtRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def price(self) -> PriceRequestBuilder: + """ + Provides operations to call the price method. + """ + from .price.price_request_builder import PriceRequestBuilder + + return PriceRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def price_disc(self) -> PriceDiscRequestBuilder: + """ + Provides operations to call the priceDisc method. + """ + from .price_disc.price_disc_request_builder import PriceDiscRequestBuilder + + return PriceDiscRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def price_mat(self) -> PriceMatRequestBuilder: + """ + Provides operations to call the priceMat method. + """ + from .price_mat.price_mat_request_builder import PriceMatRequestBuilder + + return PriceMatRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def product(self) -> ProductRequestBuilder: + """ + Provides operations to call the product method. + """ + from .product.product_request_builder import ProductRequestBuilder + + return ProductRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def proper(self) -> ProperRequestBuilder: + """ + Provides operations to call the proper method. + """ + from .proper.proper_request_builder import ProperRequestBuilder + + return ProperRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def pv(self) -> PvRequestBuilder: + """ + Provides operations to call the pv method. + """ + from .pv.pv_request_builder import PvRequestBuilder + + return PvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def quartile_exc(self) -> Quartile_ExcRequestBuilder: + """ + Provides operations to call the quartile_Exc method. + """ + from .quartile_exc.quartile_exc_request_builder import Quartile_ExcRequestBuilder + + return Quartile_ExcRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def quartile_inc(self) -> Quartile_IncRequestBuilder: + """ + Provides operations to call the quartile_Inc method. + """ + from .quartile_inc.quartile_inc_request_builder import Quartile_IncRequestBuilder + + return Quartile_IncRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def quotient(self) -> QuotientRequestBuilder: + """ + Provides operations to call the quotient method. + """ + from .quotient.quotient_request_builder import QuotientRequestBuilder + + return QuotientRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def radians(self) -> RadiansRequestBuilder: + """ + Provides operations to call the radians method. + """ + from .radians.radians_request_builder import RadiansRequestBuilder + + return RadiansRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rand(self) -> RandRequestBuilder: + """ + Provides operations to call the rand method. + """ + from .rand.rand_request_builder import RandRequestBuilder + + return RandRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rand_between(self) -> RandBetweenRequestBuilder: + """ + Provides operations to call the randBetween method. + """ + from .rand_between.rand_between_request_builder import RandBetweenRequestBuilder + + return RandBetweenRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rank_avg(self) -> Rank_AvgRequestBuilder: + """ + Provides operations to call the rank_Avg method. + """ + from .rank_avg.rank_avg_request_builder import Rank_AvgRequestBuilder + + return Rank_AvgRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rank_eq(self) -> Rank_EqRequestBuilder: + """ + Provides operations to call the rank_Eq method. + """ + from .rank_eq.rank_eq_request_builder import Rank_EqRequestBuilder + + return Rank_EqRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rate(self) -> RateRequestBuilder: + """ + Provides operations to call the rate method. + """ + from .rate.rate_request_builder import RateRequestBuilder + + return RateRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def received(self) -> ReceivedRequestBuilder: + """ + Provides operations to call the received method. + """ + from .received.received_request_builder import ReceivedRequestBuilder + + return ReceivedRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def replace(self) -> ReplaceRequestBuilder: + """ + Provides operations to call the replace method. + """ + from .replace.replace_request_builder import ReplaceRequestBuilder + + return ReplaceRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def replace_b(self) -> ReplaceBRequestBuilder: + """ + Provides operations to call the replaceB method. + """ + from .replace_b.replace_b_request_builder import ReplaceBRequestBuilder + + return ReplaceBRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rept(self) -> ReptRequestBuilder: + """ + Provides operations to call the rept method. + """ + from .rept.rept_request_builder import ReptRequestBuilder + + return ReptRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def right(self) -> RightRequestBuilder: + """ + Provides operations to call the right method. + """ + from .right.right_request_builder import RightRequestBuilder + + return RightRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rightb(self) -> RightbRequestBuilder: + """ + Provides operations to call the rightb method. + """ + from .rightb.rightb_request_builder import RightbRequestBuilder + + return RightbRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def roman(self) -> RomanRequestBuilder: + """ + Provides operations to call the roman method. + """ + from .roman.roman_request_builder import RomanRequestBuilder + + return RomanRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def round(self) -> RoundRequestBuilder: + """ + Provides operations to call the round method. + """ + from .round.round_request_builder import RoundRequestBuilder + + return RoundRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def round_down(self) -> RoundDownRequestBuilder: + """ + Provides operations to call the roundDown method. + """ + from .round_down.round_down_request_builder import RoundDownRequestBuilder + + return RoundDownRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def round_up(self) -> RoundUpRequestBuilder: + """ + Provides operations to call the roundUp method. + """ + from .round_up.round_up_request_builder import RoundUpRequestBuilder + + return RoundUpRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rows(self) -> RowsRequestBuilder: + """ + Provides operations to call the rows method. + """ + from .rows.rows_request_builder import RowsRequestBuilder + + return RowsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rri(self) -> RriRequestBuilder: + """ + Provides operations to call the rri method. + """ + from .rri.rri_request_builder import RriRequestBuilder + + return RriRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sec(self) -> SecRequestBuilder: + """ + Provides operations to call the sec method. + """ + from .sec.sec_request_builder import SecRequestBuilder + + return SecRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sech(self) -> SechRequestBuilder: + """ + Provides operations to call the sech method. + """ + from .sech.sech_request_builder import SechRequestBuilder + + return SechRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def second(self) -> SecondRequestBuilder: + """ + Provides operations to call the second method. + """ + from .second.second_request_builder import SecondRequestBuilder + + return SecondRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def series_sum(self) -> SeriesSumRequestBuilder: + """ + Provides operations to call the seriesSum method. + """ + from .series_sum.series_sum_request_builder import SeriesSumRequestBuilder + + return SeriesSumRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sheet(self) -> SheetRequestBuilder: + """ + Provides operations to call the sheet method. + """ + from .sheet.sheet_request_builder import SheetRequestBuilder + + return SheetRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sheets(self) -> SheetsRequestBuilder: + """ + Provides operations to call the sheets method. + """ + from .sheets.sheets_request_builder import SheetsRequestBuilder + + return SheetsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sign(self) -> SignRequestBuilder: + """ + Provides operations to call the sign method. + """ + from .sign.sign_request_builder import SignRequestBuilder + + return SignRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sin(self) -> SinRequestBuilder: + """ + Provides operations to call the sin method. + """ + from .sin.sin_request_builder import SinRequestBuilder + + return SinRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sinh(self) -> SinhRequestBuilder: + """ + Provides operations to call the sinh method. + """ + from .sinh.sinh_request_builder import SinhRequestBuilder + + return SinhRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def skew(self) -> SkewRequestBuilder: + """ + Provides operations to call the skew method. + """ + from .skew.skew_request_builder import SkewRequestBuilder + + return SkewRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def skew_p(self) -> Skew_pRequestBuilder: + """ + Provides operations to call the skew_p method. + """ + from .skew_p.skew_p_request_builder import Skew_pRequestBuilder + + return Skew_pRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sln(self) -> SlnRequestBuilder: + """ + Provides operations to call the sln method. + """ + from .sln.sln_request_builder import SlnRequestBuilder + + return SlnRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def small(self) -> SmallRequestBuilder: + """ + Provides operations to call the small method. + """ + from .small.small_request_builder import SmallRequestBuilder + + return SmallRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sqrt(self) -> SqrtRequestBuilder: + """ + Provides operations to call the sqrt method. + """ + from .sqrt.sqrt_request_builder import SqrtRequestBuilder + + return SqrtRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sqrt_pi(self) -> SqrtPiRequestBuilder: + """ + Provides operations to call the sqrtPi method. + """ + from .sqrt_pi.sqrt_pi_request_builder import SqrtPiRequestBuilder + + return SqrtPiRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def st_dev_a(self) -> StDevARequestBuilder: + """ + Provides operations to call the stDevA method. + """ + from .st_dev_a.st_dev_a_request_builder import StDevARequestBuilder + + return StDevARequestBuilder(self.request_adapter, self.path_parameters) + + @property + def st_dev_p(self) -> StDev_PRequestBuilder: + """ + Provides operations to call the stDev_P method. + """ + from .st_dev_p.st_dev_p_request_builder import StDev_PRequestBuilder + + return StDev_PRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def st_dev_p_a(self) -> StDevPARequestBuilder: + """ + Provides operations to call the stDevPA method. + """ + from .st_dev_p_a.st_dev_p_a_request_builder import StDevPARequestBuilder + + return StDevPARequestBuilder(self.request_adapter, self.path_parameters) + + @property + def st_dev_s(self) -> StDev_SRequestBuilder: + """ + Provides operations to call the stDev_S method. + """ + from .st_dev_s.st_dev_s_request_builder import StDev_SRequestBuilder + + return StDev_SRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def standardize(self) -> StandardizeRequestBuilder: + """ + Provides operations to call the standardize method. + """ + from .standardize.standardize_request_builder import StandardizeRequestBuilder + + return StandardizeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def substitute(self) -> SubstituteRequestBuilder: + """ + Provides operations to call the substitute method. + """ + from .substitute.substitute_request_builder import SubstituteRequestBuilder + + return SubstituteRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def subtotal(self) -> SubtotalRequestBuilder: + """ + Provides operations to call the subtotal method. + """ + from .subtotal.subtotal_request_builder import SubtotalRequestBuilder + + return SubtotalRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sum(self) -> SumRequestBuilder: + """ + Provides operations to call the sum method. + """ + from .sum.sum_request_builder import SumRequestBuilder + + return SumRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sum_if(self) -> SumIfRequestBuilder: + """ + Provides operations to call the sumIf method. + """ + from .sum_if.sum_if_request_builder import SumIfRequestBuilder + + return SumIfRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sum_ifs(self) -> SumIfsRequestBuilder: + """ + Provides operations to call the sumIfs method. + """ + from .sum_ifs.sum_ifs_request_builder import SumIfsRequestBuilder + + return SumIfsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sum_sq(self) -> SumSqRequestBuilder: + """ + Provides operations to call the sumSq method. + """ + from .sum_sq.sum_sq_request_builder import SumSqRequestBuilder + + return SumSqRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def syd(self) -> SydRequestBuilder: + """ + Provides operations to call the syd method. + """ + from .syd.syd_request_builder import SydRequestBuilder + + return SydRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def t(self) -> TRequestBuilder: + """ + Provides operations to call the t method. + """ + from .t.t_request_builder import TRequestBuilder + + return TRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def t_dist(self) -> T_DistRequestBuilder: + """ + Provides operations to call the t_Dist method. + """ + from .t_dist.t_dist_request_builder import T_DistRequestBuilder + + return T_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def t_dist_2_t(self) -> T_Dist_2TRequestBuilder: + """ + Provides operations to call the t_Dist_2T method. + """ + from .t_dist_2_t.t_dist_2_t_request_builder import T_Dist_2TRequestBuilder + + return T_Dist_2TRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def t_dist_r_t(self) -> T_Dist_RTRequestBuilder: + """ + Provides operations to call the t_Dist_RT method. + """ + from .t_dist_r_t.t_dist_r_t_request_builder import T_Dist_RTRequestBuilder + + return T_Dist_RTRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def t_inv(self) -> T_InvRequestBuilder: + """ + Provides operations to call the t_Inv method. + """ + from .t_inv.t_inv_request_builder import T_InvRequestBuilder + + return T_InvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def t_inv_2_t(self) -> T_Inv_2TRequestBuilder: + """ + Provides operations to call the t_Inv_2T method. + """ + from .t_inv_2_t.t_inv_2_t_request_builder import T_Inv_2TRequestBuilder + + return T_Inv_2TRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def tan(self) -> TanRequestBuilder: + """ + Provides operations to call the tan method. + """ + from .tan.tan_request_builder import TanRequestBuilder + + return TanRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def tanh(self) -> TanhRequestBuilder: + """ + Provides operations to call the tanh method. + """ + from .tanh.tanh_request_builder import TanhRequestBuilder + + return TanhRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def tbill_eq(self) -> TbillEqRequestBuilder: + """ + Provides operations to call the tbillEq method. + """ + from .tbill_eq.tbill_eq_request_builder import TbillEqRequestBuilder + + return TbillEqRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def tbill_price(self) -> TbillPriceRequestBuilder: + """ + Provides operations to call the tbillPrice method. + """ + from .tbill_price.tbill_price_request_builder import TbillPriceRequestBuilder + + return TbillPriceRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def tbill_yield(self) -> TbillYieldRequestBuilder: + """ + Provides operations to call the tbillYield method. + """ + from .tbill_yield.tbill_yield_request_builder import TbillYieldRequestBuilder + + return TbillYieldRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def text(self) -> TextRequestBuilder: + """ + Provides operations to call the text method. + """ + from .text.text_request_builder import TextRequestBuilder + + return TextRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def time(self) -> TimeRequestBuilder: + """ + Provides operations to call the time method. + """ + from .time.time_request_builder import TimeRequestBuilder + + return TimeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def timevalue(self) -> TimevalueRequestBuilder: + """ + Provides operations to call the timevalue method. + """ + from .timevalue.timevalue_request_builder import TimevalueRequestBuilder + + return TimevalueRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def today(self) -> TodayRequestBuilder: + """ + Provides operations to call the today method. + """ + from .today.today_request_builder import TodayRequestBuilder + + return TodayRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def trim(self) -> TrimRequestBuilder: + """ + Provides operations to call the trim method. + """ + from .trim.trim_request_builder import TrimRequestBuilder + + return TrimRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def trim_mean(self) -> TrimMeanRequestBuilder: + """ + Provides operations to call the trimMean method. + """ + from .trim_mean.trim_mean_request_builder import TrimMeanRequestBuilder + + return TrimMeanRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def true_(self) -> TrueRequestBuilder: + """ + Provides operations to call the true method. + """ + from .true_.true_request_builder import TrueRequestBuilder + + return TrueRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def trunc(self) -> TruncRequestBuilder: + """ + Provides operations to call the trunc method. + """ + from .trunc.trunc_request_builder import TruncRequestBuilder + + return TruncRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def type(self) -> TypeRequestBuilder: + """ + Provides operations to call the type method. + """ + from .type.type_request_builder import TypeRequestBuilder + + return TypeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def unichar(self) -> UnicharRequestBuilder: + """ + Provides operations to call the unichar method. + """ + from .unichar.unichar_request_builder import UnicharRequestBuilder + + return UnicharRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def unicode(self) -> UnicodeRequestBuilder: + """ + Provides operations to call the unicode method. + """ + from .unicode.unicode_request_builder import UnicodeRequestBuilder + + return UnicodeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def upper(self) -> UpperRequestBuilder: + """ + Provides operations to call the upper method. + """ + from .upper.upper_request_builder import UpperRequestBuilder + + return UpperRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def usdollar(self) -> UsdollarRequestBuilder: + """ + Provides operations to call the usdollar method. + """ + from .usdollar.usdollar_request_builder import UsdollarRequestBuilder + + return UsdollarRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def value(self) -> ValueRequestBuilder: + """ + Provides operations to call the value method. + """ + from .value.value_request_builder import ValueRequestBuilder + + return ValueRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def var_a(self) -> VarARequestBuilder: + """ + Provides operations to call the varA method. + """ + from .var_a.var_a_request_builder import VarARequestBuilder + + return VarARequestBuilder(self.request_adapter, self.path_parameters) + + @property + def var_p(self) -> Var_PRequestBuilder: + """ + Provides operations to call the var_P method. + """ + from .var_p.var_p_request_builder import Var_PRequestBuilder + + return Var_PRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def var_p_a(self) -> VarPARequestBuilder: + """ + Provides operations to call the varPA method. + """ + from .var_p_a.var_p_a_request_builder import VarPARequestBuilder + + return VarPARequestBuilder(self.request_adapter, self.path_parameters) + + @property + def var_s(self) -> Var_SRequestBuilder: + """ + Provides operations to call the var_S method. + """ + from .var_s.var_s_request_builder import Var_SRequestBuilder + + return Var_SRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def vdb(self) -> VdbRequestBuilder: + """ + Provides operations to call the vdb method. + """ + from .vdb.vdb_request_builder import VdbRequestBuilder + + return VdbRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def vlookup(self) -> VlookupRequestBuilder: + """ + Provides operations to call the vlookup method. + """ + from .vlookup.vlookup_request_builder import VlookupRequestBuilder + + return VlookupRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def week_num(self) -> WeekNumRequestBuilder: + """ + Provides operations to call the weekNum method. + """ + from .week_num.week_num_request_builder import WeekNumRequestBuilder + + return WeekNumRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def weekday(self) -> WeekdayRequestBuilder: + """ + Provides operations to call the weekday method. + """ + from .weekday.weekday_request_builder import WeekdayRequestBuilder + + return WeekdayRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def weibull_dist(self) -> Weibull_DistRequestBuilder: + """ + Provides operations to call the weibull_Dist method. + """ + from .weibull_dist.weibull_dist_request_builder import Weibull_DistRequestBuilder + + return Weibull_DistRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def work_day(self) -> WorkDayRequestBuilder: + """ + Provides operations to call the workDay method. + """ + from .work_day.work_day_request_builder import WorkDayRequestBuilder + + return WorkDayRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def work_day_intl(self) -> WorkDay_IntlRequestBuilder: + """ + Provides operations to call the workDay_Intl method. + """ + from .work_day_intl.work_day_intl_request_builder import WorkDay_IntlRequestBuilder + + return WorkDay_IntlRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def xirr(self) -> XirrRequestBuilder: + """ + Provides operations to call the xirr method. + """ + from .xirr.xirr_request_builder import XirrRequestBuilder + + return XirrRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def xnpv(self) -> XnpvRequestBuilder: + """ + Provides operations to call the xnpv method. + """ + from .xnpv.xnpv_request_builder import XnpvRequestBuilder + + return XnpvRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def xor(self) -> XorRequestBuilder: + """ + Provides operations to call the xor method. + """ + from .xor.xor_request_builder import XorRequestBuilder + + return XorRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def year(self) -> YearRequestBuilder: + """ + Provides operations to call the year method. + """ + from .year.year_request_builder import YearRequestBuilder + + return YearRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def year_frac(self) -> YearFracRequestBuilder: + """ + Provides operations to call the yearFrac method. + """ + from .year_frac.year_frac_request_builder import YearFracRequestBuilder + + return YearFracRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def yield_(self) -> YieldRequestBuilder: + """ + Provides operations to call the yield method. + """ + from .yield_.yield_request_builder import YieldRequestBuilder + + return YieldRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def yield_disc(self) -> YieldDiscRequestBuilder: + """ + Provides operations to call the yieldDisc method. + """ + from .yield_disc.yield_disc_request_builder import YieldDiscRequestBuilder + + return YieldDiscRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def yield_mat(self) -> YieldMatRequestBuilder: + """ + Provides operations to call the yieldMat method. + """ + from .yield_mat.yield_mat_request_builder import YieldMatRequestBuilder + + return YieldMatRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def z_test(self) -> Z_TestRequestBuilder: + """ + Provides operations to call the z_Test method. + """ + from .z_test.z_test_request_builder import Z_TestRequestBuilder + + return Z_TestRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FunctionsRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FunctionsRequestBuilderGetQueryParameters(): + """ + Get functions from storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FunctionsRequestBuilderGetRequestConfiguration(RequestConfiguration[FunctionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FunctionsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fv/fv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fv/fv_post_request_body.py new file mode 100644 index 00000000000..43d4701a98e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fv/fv_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class FvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The nper property + nper: Optional[Json] = None + # The pmt property + pmt: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The type property + type: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "nper": lambda n : setattr(self, 'nper', n.get_object_value(Json)), + "pmt": lambda n : setattr(self, 'pmt', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "type": lambda n : setattr(self, 'type', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("nper", self.nper) + writer.write_object_value("pmt", self.pmt) + writer.write_object_value("pv", self.pv) + writer.write_object_value("rate", self.rate) + writer.write_object_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fv/fv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fv/fv_request_builder.py new file mode 100644 index 00000000000..f31de2670ea --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fv/fv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .fv_post_request_body import FvPostRequestBody + +class FvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the fv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/fv", path_parameters) + + async def post(self,body: FvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action fv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: FvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action fv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fvschedule/fvschedule_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fvschedule/fvschedule_post_request_body.py new file mode 100644 index 00000000000..5e2b938ac96 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fvschedule/fvschedule_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class FvschedulePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The principal property + principal: Optional[Json] = None + # The schedule property + schedule: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> FvschedulePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: FvschedulePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return FvschedulePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "principal": lambda n : setattr(self, 'principal', n.get_object_value(Json)), + "schedule": lambda n : setattr(self, 'schedule', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("principal", self.principal) + writer.write_object_value("schedule", self.schedule) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fvschedule/fvschedule_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fvschedule/fvschedule_request_builder.py new file mode 100644 index 00000000000..540da3fa388 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/fvschedule/fvschedule_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .fvschedule_post_request_body import FvschedulePostRequestBody + +class FvscheduleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the fvschedule method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FvscheduleRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/fvschedule", path_parameters) + + async def post(self,body: FvschedulePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action fvschedule + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: FvschedulePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action fvschedule + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FvscheduleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FvscheduleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FvscheduleRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FvscheduleRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma/gamma_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma/gamma_post_request_body.py new file mode 100644 index 00000000000..0055070da70 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma/gamma_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class GammaPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GammaPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GammaPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GammaPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma/gamma_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma/gamma_request_builder.py new file mode 100644 index 00000000000..87ac2af7f47 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma/gamma_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .gamma_post_request_body import GammaPostRequestBody + +class GammaRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the gamma method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GammaRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/gamma", path_parameters) + + async def post(self,body: GammaPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action gamma + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: GammaPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action gamma + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> GammaRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GammaRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GammaRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GammaRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_dist/gamma_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_dist/gamma_dist_post_request_body.py new file mode 100644 index 00000000000..35228f4e40d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_dist/gamma_dist_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Gamma_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The alpha property + alpha: Optional[Json] = None + # The beta property + beta: Optional[Json] = None + # The cumulative property + cumulative: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Gamma_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Gamma_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Gamma_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "alpha": lambda n : setattr(self, 'alpha', n.get_object_value(Json)), + "beta": lambda n : setattr(self, 'beta', n.get_object_value(Json)), + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("alpha", self.alpha) + writer.write_object_value("beta", self.beta) + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_dist/gamma_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_dist/gamma_dist_request_builder.py new file mode 100644 index 00000000000..888a25b355b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_dist/gamma_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .gamma_dist_post_request_body import Gamma_DistPostRequestBody + +class Gamma_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the gamma_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Gamma_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/gamma_Dist", path_parameters) + + async def post(self,body: Gamma_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action gamma_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Gamma_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action gamma_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Gamma_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Gamma_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Gamma_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Gamma_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_inv/gamma_inv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_inv/gamma_inv_post_request_body.py new file mode 100644 index 00000000000..eeb75a26528 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_inv/gamma_inv_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Gamma_InvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The alpha property + alpha: Optional[Json] = None + # The beta property + beta: Optional[Json] = None + # The probability property + probability: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Gamma_InvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Gamma_InvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Gamma_InvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "alpha": lambda n : setattr(self, 'alpha', n.get_object_value(Json)), + "beta": lambda n : setattr(self, 'beta', n.get_object_value(Json)), + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("alpha", self.alpha) + writer.write_object_value("beta", self.beta) + writer.write_object_value("probability", self.probability) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_inv/gamma_inv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_inv/gamma_inv_request_builder.py new file mode 100644 index 00000000000..4a635a27372 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_inv/gamma_inv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .gamma_inv_post_request_body import Gamma_InvPostRequestBody + +class Gamma_InvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the gamma_Inv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Gamma_InvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/gamma_Inv", path_parameters) + + async def post(self,body: Gamma_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action gamma_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Gamma_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action gamma_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Gamma_InvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Gamma_InvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Gamma_InvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Gamma_InvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln/gamma_ln_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln/gamma_ln_post_request_body.py new file mode 100644 index 00000000000..7773c43658a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln/gamma_ln_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class GammaLnPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GammaLnPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GammaLnPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GammaLnPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln/gamma_ln_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln/gamma_ln_request_builder.py new file mode 100644 index 00000000000..b48247cecb5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln/gamma_ln_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .gamma_ln_post_request_body import GammaLnPostRequestBody + +class GammaLnRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the gammaLn method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GammaLnRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/gammaLn", path_parameters) + + async def post(self,body: GammaLnPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action gammaLn + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: GammaLnPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action gammaLn + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> GammaLnRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GammaLnRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GammaLnRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GammaLnRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_post_request_body.py new file mode 100644 index 00000000000..d35f2b41a25 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class GammaLn_PrecisePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GammaLn_PrecisePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GammaLn_PrecisePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GammaLn_PrecisePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_request_builder.py new file mode 100644 index 00000000000..5f2598a634f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gamma_ln_precise/gamma_ln_precise_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .gamma_ln_precise_post_request_body import GammaLn_PrecisePostRequestBody + +class GammaLn_PreciseRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the gammaLn_Precise method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GammaLn_PreciseRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/gammaLn_Precise", path_parameters) + + async def post(self,body: GammaLn_PrecisePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action gammaLn_Precise + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: GammaLn_PrecisePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action gammaLn_Precise + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> GammaLn_PreciseRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GammaLn_PreciseRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GammaLn_PreciseRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GammaLn_PreciseRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gauss/gauss_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gauss/gauss_post_request_body.py new file mode 100644 index 00000000000..48f0e6c721e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gauss/gauss_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class GaussPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GaussPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GaussPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GaussPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gauss/gauss_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gauss/gauss_request_builder.py new file mode 100644 index 00000000000..c8fd8e20c61 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gauss/gauss_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .gauss_post_request_body import GaussPostRequestBody + +class GaussRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the gauss method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GaussRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/gauss", path_parameters) + + async def post(self,body: GaussPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action gauss + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: GaussPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action gauss + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> GaussRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GaussRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GaussRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GaussRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gcd/gcd_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gcd/gcd_post_request_body.py new file mode 100644 index 00000000000..e86918e581a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gcd/gcd_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class GcdPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GcdPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GcdPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GcdPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gcd/gcd_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gcd/gcd_request_builder.py new file mode 100644 index 00000000000..cffce89f8b1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/gcd/gcd_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .gcd_post_request_body import GcdPostRequestBody + +class GcdRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the gcd method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GcdRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/gcd", path_parameters) + + async def post(self,body: GcdPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action gcd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: GcdPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action gcd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> GcdRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GcdRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GcdRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GcdRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ge_step/ge_step_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ge_step/ge_step_post_request_body.py new file mode 100644 index 00000000000..46d78d364a1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ge_step/ge_step_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class GeStepPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The step property + step: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GeStepPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GeStepPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GeStepPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "step": lambda n : setattr(self, 'step', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("step", self.step) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ge_step/ge_step_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ge_step/ge_step_request_builder.py new file mode 100644 index 00000000000..c2b8d9f08d2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ge_step/ge_step_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .ge_step_post_request_body import GeStepPostRequestBody + +class GeStepRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the geStep method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GeStepRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/geStep", path_parameters) + + async def post(self,body: GeStepPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action geStep + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: GeStepPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action geStep + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> GeStepRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GeStepRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GeStepRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GeStepRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/geo_mean/geo_mean_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/geo_mean/geo_mean_post_request_body.py new file mode 100644 index 00000000000..7e605983d14 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/geo_mean/geo_mean_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class GeoMeanPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GeoMeanPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GeoMeanPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GeoMeanPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/geo_mean/geo_mean_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/geo_mean/geo_mean_request_builder.py new file mode 100644 index 00000000000..32e1ae97d66 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/geo_mean/geo_mean_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .geo_mean_post_request_body import GeoMeanPostRequestBody + +class GeoMeanRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the geoMean method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GeoMeanRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/geoMean", path_parameters) + + async def post(self,body: GeoMeanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action geoMean + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: GeoMeanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action geoMean + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> GeoMeanRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GeoMeanRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GeoMeanRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GeoMeanRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/har_mean/har_mean_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/har_mean/har_mean_post_request_body.py new file mode 100644 index 00000000000..9bc2b6c4772 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/har_mean/har_mean_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class HarMeanPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> HarMeanPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: HarMeanPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return HarMeanPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/har_mean/har_mean_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/har_mean/har_mean_request_builder.py new file mode 100644 index 00000000000..9dbe52aa87c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/har_mean/har_mean_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .har_mean_post_request_body import HarMeanPostRequestBody + +class HarMeanRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the harMean method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HarMeanRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/harMean", path_parameters) + + async def post(self,body: HarMeanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action harMean + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: HarMeanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action harMean + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> HarMeanRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HarMeanRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HarMeanRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HarMeanRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_bin/hex2_bin_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_bin/hex2_bin_post_request_body.py new file mode 100644 index 00000000000..00b8e4953ac --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_bin/hex2_bin_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Hex2BinPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The places property + places: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Hex2BinPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Hex2BinPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Hex2BinPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "places": lambda n : setattr(self, 'places', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("places", self.places) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_bin/hex2_bin_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_bin/hex2_bin_request_builder.py new file mode 100644 index 00000000000..f320a1c468a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_bin/hex2_bin_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .hex2_bin_post_request_body import Hex2BinPostRequestBody + +class Hex2BinRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the hex2Bin method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Hex2BinRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/hex2Bin", path_parameters) + + async def post(self,body: Hex2BinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action hex2Bin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Hex2BinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action hex2Bin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Hex2BinRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Hex2BinRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Hex2BinRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Hex2BinRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_dec/hex2_dec_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_dec/hex2_dec_post_request_body.py new file mode 100644 index 00000000000..7bc917f0ff3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_dec/hex2_dec_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Hex2DecPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Hex2DecPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Hex2DecPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Hex2DecPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_dec/hex2_dec_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_dec/hex2_dec_request_builder.py new file mode 100644 index 00000000000..5e269653c2f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_dec/hex2_dec_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .hex2_dec_post_request_body import Hex2DecPostRequestBody + +class Hex2DecRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the hex2Dec method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Hex2DecRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/hex2Dec", path_parameters) + + async def post(self,body: Hex2DecPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action hex2Dec + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Hex2DecPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action hex2Dec + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Hex2DecRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Hex2DecRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Hex2DecRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Hex2DecRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_oct/hex2_oct_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_oct/hex2_oct_post_request_body.py new file mode 100644 index 00000000000..ea27041ac3a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_oct/hex2_oct_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Hex2OctPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The places property + places: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Hex2OctPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Hex2OctPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Hex2OctPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "places": lambda n : setattr(self, 'places', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("places", self.places) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_oct/hex2_oct_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_oct/hex2_oct_request_builder.py new file mode 100644 index 00000000000..738d7bc2f05 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hex2_oct/hex2_oct_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .hex2_oct_post_request_body import Hex2OctPostRequestBody + +class Hex2OctRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the hex2Oct method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Hex2OctRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/hex2Oct", path_parameters) + + async def post(self,body: Hex2OctPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action hex2Oct + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Hex2OctPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action hex2Oct + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Hex2OctRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Hex2OctRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Hex2OctRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Hex2OctRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hlookup/hlookup_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hlookup/hlookup_post_request_body.py new file mode 100644 index 00000000000..ee7b4faf3c8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hlookup/hlookup_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class HlookupPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The lookupValue property + lookup_value: Optional[Json] = None + # The rangeLookup property + range_lookup: Optional[Json] = None + # The rowIndexNum property + row_index_num: Optional[Json] = None + # The tableArray property + table_array: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> HlookupPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: HlookupPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return HlookupPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "lookupValue": lambda n : setattr(self, 'lookup_value', n.get_object_value(Json)), + "rangeLookup": lambda n : setattr(self, 'range_lookup', n.get_object_value(Json)), + "rowIndexNum": lambda n : setattr(self, 'row_index_num', n.get_object_value(Json)), + "tableArray": lambda n : setattr(self, 'table_array', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("lookupValue", self.lookup_value) + writer.write_object_value("rangeLookup", self.range_lookup) + writer.write_object_value("rowIndexNum", self.row_index_num) + writer.write_object_value("tableArray", self.table_array) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hlookup/hlookup_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hlookup/hlookup_request_builder.py new file mode 100644 index 00000000000..974746eca6e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hlookup/hlookup_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .hlookup_post_request_body import HlookupPostRequestBody + +class HlookupRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the hlookup method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HlookupRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/hlookup", path_parameters) + + async def post(self,body: HlookupPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action hlookup + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: HlookupPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action hlookup + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> HlookupRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HlookupRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HlookupRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HlookupRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hour/hour_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hour/hour_post_request_body.py new file mode 100644 index 00000000000..34e79c84ed3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hour/hour_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class HourPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The serialNumber property + serial_number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> HourPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: HourPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return HourPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "serialNumber": lambda n : setattr(self, 'serial_number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("serialNumber", self.serial_number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hour/hour_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hour/hour_request_builder.py new file mode 100644 index 00000000000..696fbe621fc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hour/hour_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .hour_post_request_body import HourPostRequestBody + +class HourRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the hour method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HourRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/hour", path_parameters) + + async def post(self,body: HourPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action hour + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: HourPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action hour + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> HourRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HourRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HourRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HourRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_post_request_body.py new file mode 100644 index 00000000000..2b1ddf838d8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class HypGeom_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The numberPop property + number_pop: Optional[Json] = None + # The numberSample property + number_sample: Optional[Json] = None + # The populationS property + population_s: Optional[Json] = None + # The sampleS property + sample_s: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> HypGeom_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: HypGeom_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return HypGeom_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "numberPop": lambda n : setattr(self, 'number_pop', n.get_object_value(Json)), + "numberSample": lambda n : setattr(self, 'number_sample', n.get_object_value(Json)), + "populationS": lambda n : setattr(self, 'population_s', n.get_object_value(Json)), + "sampleS": lambda n : setattr(self, 'sample_s', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("numberPop", self.number_pop) + writer.write_object_value("numberSample", self.number_sample) + writer.write_object_value("populationS", self.population_s) + writer.write_object_value("sampleS", self.sample_s) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_request_builder.py new file mode 100644 index 00000000000..b873a5ba6a7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyp_geom_dist/hyp_geom_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .hyp_geom_dist_post_request_body import HypGeom_DistPostRequestBody + +class HypGeom_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the hypGeom_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HypGeom_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/hypGeom_Dist", path_parameters) + + async def post(self,body: HypGeom_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action hypGeom_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: HypGeom_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action hypGeom_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> HypGeom_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HypGeom_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HypGeom_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HypGeom_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyperlink/hyperlink_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyperlink/hyperlink_post_request_body.py new file mode 100644 index 00000000000..ba02a514c1c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyperlink/hyperlink_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class HyperlinkPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The friendlyName property + friendly_name: Optional[Json] = None + # The linkLocation property + link_location: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> HyperlinkPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: HyperlinkPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return HyperlinkPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "friendlyName": lambda n : setattr(self, 'friendly_name', n.get_object_value(Json)), + "linkLocation": lambda n : setattr(self, 'link_location', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("friendlyName", self.friendly_name) + writer.write_object_value("linkLocation", self.link_location) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyperlink/hyperlink_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyperlink/hyperlink_request_builder.py new file mode 100644 index 00000000000..fa5123bc5d0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/hyperlink/hyperlink_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .hyperlink_post_request_body import HyperlinkPostRequestBody + +class HyperlinkRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the hyperlink method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HyperlinkRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/hyperlink", path_parameters) + + async def post(self,body: HyperlinkPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action hyperlink + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: HyperlinkPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action hyperlink + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> HyperlinkRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HyperlinkRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HyperlinkRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HyperlinkRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/if_/if_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/if_/if_post_request_body.py new file mode 100644 index 00000000000..131af2b6c98 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/if_/if_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IfPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The logicalTest property + logical_test: Optional[Json] = None + # The valueIfFalse property + value_if_false: Optional[Json] = None + # The valueIfTrue property + value_if_true: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IfPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IfPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IfPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "logicalTest": lambda n : setattr(self, 'logical_test', n.get_object_value(Json)), + "valueIfFalse": lambda n : setattr(self, 'value_if_false', n.get_object_value(Json)), + "valueIfTrue": lambda n : setattr(self, 'value_if_true', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("logicalTest", self.logical_test) + writer.write_object_value("valueIfFalse", self.value_if_false) + writer.write_object_value("valueIfTrue", self.value_if_true) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/if_/if_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/if_/if_request_builder.py new file mode 100644 index 00000000000..a237ce5f8bb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/if_/if_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .if_post_request_body import IfPostRequestBody + +class IfRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the if method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IfRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/if", path_parameters) + + async def post(self,body: IfPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action if + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IfPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action if + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IfRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IfRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IfRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IfRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_abs/im_abs_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_abs/im_abs_post_request_body.py new file mode 100644 index 00000000000..66972951b54 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_abs/im_abs_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImAbsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImAbsPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImAbsPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImAbsPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_abs/im_abs_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_abs/im_abs_request_builder.py new file mode 100644 index 00000000000..ca5307fe9f7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_abs/im_abs_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_abs_post_request_body import ImAbsPostRequestBody + +class ImAbsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imAbs method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImAbsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imAbs", path_parameters) + + async def post(self,body: ImAbsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imAbs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImAbsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imAbs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImAbsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImAbsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImAbsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImAbsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_argument/im_argument_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_argument/im_argument_post_request_body.py new file mode 100644 index 00000000000..e47864f29a9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_argument/im_argument_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImArgumentPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImArgumentPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImArgumentPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImArgumentPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_argument/im_argument_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_argument/im_argument_request_builder.py new file mode 100644 index 00000000000..65e45960586 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_argument/im_argument_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_argument_post_request_body import ImArgumentPostRequestBody + +class ImArgumentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imArgument method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImArgumentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imArgument", path_parameters) + + async def post(self,body: ImArgumentPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imArgument + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImArgumentPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imArgument + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImArgumentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImArgumentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImArgumentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImArgumentRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_conjugate/im_conjugate_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_conjugate/im_conjugate_post_request_body.py new file mode 100644 index 00000000000..8109abe4643 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_conjugate/im_conjugate_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImConjugatePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImConjugatePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImConjugatePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImConjugatePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_conjugate/im_conjugate_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_conjugate/im_conjugate_request_builder.py new file mode 100644 index 00000000000..b7e67587550 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_conjugate/im_conjugate_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_conjugate_post_request_body import ImConjugatePostRequestBody + +class ImConjugateRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imConjugate method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImConjugateRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imConjugate", path_parameters) + + async def post(self,body: ImConjugatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imConjugate + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImConjugatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imConjugate + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImConjugateRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImConjugateRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImConjugateRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImConjugateRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cos/im_cos_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cos/im_cos_post_request_body.py new file mode 100644 index 00000000000..b3115365cea --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cos/im_cos_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImCosPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImCosPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImCosPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImCosPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cos/im_cos_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cos/im_cos_request_builder.py new file mode 100644 index 00000000000..2404a6fddbb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cos/im_cos_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_cos_post_request_body import ImCosPostRequestBody + +class ImCosRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imCos method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImCosRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imCos", path_parameters) + + async def post(self,body: ImCosPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imCos + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImCosPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imCos + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImCosRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImCosRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImCosRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImCosRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cosh/im_cosh_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cosh/im_cosh_post_request_body.py new file mode 100644 index 00000000000..f6ad983ac57 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cosh/im_cosh_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImCoshPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImCoshPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImCoshPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImCoshPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cosh/im_cosh_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cosh/im_cosh_request_builder.py new file mode 100644 index 00000000000..486039750fd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cosh/im_cosh_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_cosh_post_request_body import ImCoshPostRequestBody + +class ImCoshRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imCosh method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImCoshRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imCosh", path_parameters) + + async def post(self,body: ImCoshPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imCosh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImCoshPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imCosh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImCoshRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImCoshRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImCoshRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImCoshRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cot/im_cot_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cot/im_cot_post_request_body.py new file mode 100644 index 00000000000..4380b6788ee --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cot/im_cot_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImCotPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImCotPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImCotPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImCotPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cot/im_cot_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cot/im_cot_request_builder.py new file mode 100644 index 00000000000..be4dbd3a2d6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_cot/im_cot_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_cot_post_request_body import ImCotPostRequestBody + +class ImCotRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imCot method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImCotRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imCot", path_parameters) + + async def post(self,body: ImCotPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imCot + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImCotPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imCot + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImCotRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImCotRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImCotRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImCotRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csc/im_csc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csc/im_csc_post_request_body.py new file mode 100644 index 00000000000..472513f060c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csc/im_csc_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImCscPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImCscPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImCscPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImCscPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csc/im_csc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csc/im_csc_request_builder.py new file mode 100644 index 00000000000..20037a0e913 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csc/im_csc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_csc_post_request_body import ImCscPostRequestBody + +class ImCscRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imCsc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImCscRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imCsc", path_parameters) + + async def post(self,body: ImCscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imCsc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImCscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imCsc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImCscRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImCscRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImCscRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImCscRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csch/im_csch_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csch/im_csch_post_request_body.py new file mode 100644 index 00000000000..071f4baedbb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csch/im_csch_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImCschPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImCschPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImCschPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImCschPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csch/im_csch_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csch/im_csch_request_builder.py new file mode 100644 index 00000000000..b77acf2c1b1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_csch/im_csch_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_csch_post_request_body import ImCschPostRequestBody + +class ImCschRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imCsch method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImCschRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imCsch", path_parameters) + + async def post(self,body: ImCschPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imCsch + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImCschPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imCsch + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImCschRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImCschRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImCschRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImCschRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_div/im_div_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_div/im_div_post_request_body.py new file mode 100644 index 00000000000..0d7a304f282 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_div/im_div_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImDivPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber1 property + inumber1: Optional[Json] = None + # The inumber2 property + inumber2: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImDivPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImDivPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImDivPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber1": lambda n : setattr(self, 'inumber1', n.get_object_value(Json)), + "inumber2": lambda n : setattr(self, 'inumber2', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber1", self.inumber1) + writer.write_object_value("inumber2", self.inumber2) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_div/im_div_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_div/im_div_request_builder.py new file mode 100644 index 00000000000..7d7e7a11981 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_div/im_div_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_div_post_request_body import ImDivPostRequestBody + +class ImDivRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imDiv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImDivRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imDiv", path_parameters) + + async def post(self,body: ImDivPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imDiv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImDivPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imDiv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImDivRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImDivRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImDivRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImDivRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_exp/im_exp_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_exp/im_exp_post_request_body.py new file mode 100644 index 00000000000..b595675dadb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_exp/im_exp_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImExpPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImExpPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImExpPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImExpPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_exp/im_exp_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_exp/im_exp_request_builder.py new file mode 100644 index 00000000000..d1f0e2ee047 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_exp/im_exp_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_exp_post_request_body import ImExpPostRequestBody + +class ImExpRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imExp method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImExpRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imExp", path_parameters) + + async def post(self,body: ImExpPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imExp + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImExpPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imExp + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImExpRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImExpRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImExpRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImExpRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_ln/im_ln_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_ln/im_ln_post_request_body.py new file mode 100644 index 00000000000..1e09ea7698d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_ln/im_ln_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImLnPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImLnPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImLnPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImLnPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_ln/im_ln_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_ln/im_ln_request_builder.py new file mode 100644 index 00000000000..1a45db75663 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_ln/im_ln_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_ln_post_request_body import ImLnPostRequestBody + +class ImLnRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imLn method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImLnRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imLn", path_parameters) + + async def post(self,body: ImLnPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imLn + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImLnPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imLn + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImLnRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImLnRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImLnRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImLnRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log10/im_log10_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log10/im_log10_post_request_body.py new file mode 100644 index 00000000000..cd6a7a8d137 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log10/im_log10_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImLog10PostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImLog10PostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImLog10PostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImLog10PostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log10/im_log10_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log10/im_log10_request_builder.py new file mode 100644 index 00000000000..3ee212e05e1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log10/im_log10_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_log10_post_request_body import ImLog10PostRequestBody + +class ImLog10RequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imLog10 method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImLog10RequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imLog10", path_parameters) + + async def post(self,body: ImLog10PostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imLog10 + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImLog10PostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imLog10 + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImLog10RequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImLog10RequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImLog10RequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImLog10RequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log2/im_log2_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log2/im_log2_post_request_body.py new file mode 100644 index 00000000000..83f31b5e916 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log2/im_log2_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImLog2PostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImLog2PostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImLog2PostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImLog2PostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log2/im_log2_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log2/im_log2_request_builder.py new file mode 100644 index 00000000000..7034a408cb2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_log2/im_log2_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_log2_post_request_body import ImLog2PostRequestBody + +class ImLog2RequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imLog2 method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImLog2RequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imLog2", path_parameters) + + async def post(self,body: ImLog2PostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imLog2 + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImLog2PostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imLog2 + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImLog2RequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImLog2RequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImLog2RequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImLog2RequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_power/im_power_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_power/im_power_post_request_body.py new file mode 100644 index 00000000000..6dcc851c43c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_power/im_power_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImPowerPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImPowerPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImPowerPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImPowerPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_power/im_power_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_power/im_power_request_builder.py new file mode 100644 index 00000000000..982fe8346ff --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_power/im_power_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_power_post_request_body import ImPowerPostRequestBody + +class ImPowerRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imPower method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImPowerRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imPower", path_parameters) + + async def post(self,body: ImPowerPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imPower + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImPowerPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imPower + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImPowerRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImPowerRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImPowerRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImPowerRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_product/im_product_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_product/im_product_post_request_body.py new file mode 100644 index 00000000000..225628a46c0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_product/im_product_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImProductPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImProductPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImProductPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImProductPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_product/im_product_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_product/im_product_request_builder.py new file mode 100644 index 00000000000..e023d73ef5e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_product/im_product_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_product_post_request_body import ImProductPostRequestBody + +class ImProductRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imProduct method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImProductRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imProduct", path_parameters) + + async def post(self,body: ImProductPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imProduct + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImProductPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imProduct + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImProductRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImProductRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImProductRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImProductRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_real/im_real_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_real/im_real_post_request_body.py new file mode 100644 index 00000000000..d8aef079309 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_real/im_real_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImRealPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImRealPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImRealPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImRealPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_real/im_real_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_real/im_real_request_builder.py new file mode 100644 index 00000000000..9bcdf73b68c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_real/im_real_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_real_post_request_body import ImRealPostRequestBody + +class ImRealRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imReal method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImRealRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imReal", path_parameters) + + async def post(self,body: ImRealPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imReal + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImRealPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imReal + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImRealRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImRealRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImRealRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImRealRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sec/im_sec_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sec/im_sec_post_request_body.py new file mode 100644 index 00000000000..06b74811697 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sec/im_sec_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImSecPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImSecPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImSecPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImSecPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sec/im_sec_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sec/im_sec_request_builder.py new file mode 100644 index 00000000000..ce9c29bb1e8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sec/im_sec_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_sec_post_request_body import ImSecPostRequestBody + +class ImSecRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imSec method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImSecRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imSec", path_parameters) + + async def post(self,body: ImSecPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imSec + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImSecPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imSec + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImSecRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImSecRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImSecRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImSecRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sech/im_sech_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sech/im_sech_post_request_body.py new file mode 100644 index 00000000000..afc59b28549 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sech/im_sech_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImSechPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImSechPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImSechPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImSechPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sech/im_sech_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sech/im_sech_request_builder.py new file mode 100644 index 00000000000..d38ef72029c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sech/im_sech_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_sech_post_request_body import ImSechPostRequestBody + +class ImSechRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imSech method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImSechRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imSech", path_parameters) + + async def post(self,body: ImSechPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imSech + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImSechPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imSech + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImSechRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImSechRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImSechRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImSechRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sin/im_sin_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sin/im_sin_post_request_body.py new file mode 100644 index 00000000000..8547d853bee --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sin/im_sin_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImSinPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImSinPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImSinPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImSinPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sin/im_sin_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sin/im_sin_request_builder.py new file mode 100644 index 00000000000..20b5ae14fd1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sin/im_sin_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_sin_post_request_body import ImSinPostRequestBody + +class ImSinRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imSin method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImSinRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imSin", path_parameters) + + async def post(self,body: ImSinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imSin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImSinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imSin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImSinRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImSinRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImSinRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImSinRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sinh/im_sinh_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sinh/im_sinh_post_request_body.py new file mode 100644 index 00000000000..934df792590 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sinh/im_sinh_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImSinhPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImSinhPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImSinhPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImSinhPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sinh/im_sinh_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sinh/im_sinh_request_builder.py new file mode 100644 index 00000000000..e52c2f1572d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sinh/im_sinh_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_sinh_post_request_body import ImSinhPostRequestBody + +class ImSinhRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imSinh method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImSinhRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imSinh", path_parameters) + + async def post(self,body: ImSinhPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imSinh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImSinhPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imSinh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImSinhRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImSinhRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImSinhRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImSinhRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sqrt/im_sqrt_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sqrt/im_sqrt_post_request_body.py new file mode 100644 index 00000000000..f1ab002d682 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sqrt/im_sqrt_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImSqrtPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImSqrtPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImSqrtPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImSqrtPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sqrt/im_sqrt_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sqrt/im_sqrt_request_builder.py new file mode 100644 index 00000000000..a0d33813b43 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sqrt/im_sqrt_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_sqrt_post_request_body import ImSqrtPostRequestBody + +class ImSqrtRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imSqrt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImSqrtRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imSqrt", path_parameters) + + async def post(self,body: ImSqrtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imSqrt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImSqrtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imSqrt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImSqrtRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImSqrtRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImSqrtRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImSqrtRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sub/im_sub_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sub/im_sub_post_request_body.py new file mode 100644 index 00000000000..68f10d35cb4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sub/im_sub_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImSubPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber1 property + inumber1: Optional[Json] = None + # The inumber2 property + inumber2: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImSubPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImSubPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImSubPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber1": lambda n : setattr(self, 'inumber1', n.get_object_value(Json)), + "inumber2": lambda n : setattr(self, 'inumber2', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber1", self.inumber1) + writer.write_object_value("inumber2", self.inumber2) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sub/im_sub_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sub/im_sub_request_builder.py new file mode 100644 index 00000000000..e14947ba696 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sub/im_sub_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_sub_post_request_body import ImSubPostRequestBody + +class ImSubRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imSub method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImSubRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imSub", path_parameters) + + async def post(self,body: ImSubPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imSub + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImSubPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imSub + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImSubRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImSubRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImSubRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImSubRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sum/im_sum_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sum/im_sum_post_request_body.py new file mode 100644 index 00000000000..b46f13e2bc2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sum/im_sum_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImSumPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImSumPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImSumPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImSumPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sum/im_sum_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sum/im_sum_request_builder.py new file mode 100644 index 00000000000..0b3d7d5e9b3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_sum/im_sum_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_sum_post_request_body import ImSumPostRequestBody + +class ImSumRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imSum method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImSumRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imSum", path_parameters) + + async def post(self,body: ImSumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imSum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImSumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imSum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImSumRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImSumRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImSumRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImSumRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_tan/im_tan_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_tan/im_tan_post_request_body.py new file mode 100644 index 00000000000..373e2cba102 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_tan/im_tan_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImTanPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImTanPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImTanPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImTanPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_tan/im_tan_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_tan/im_tan_request_builder.py new file mode 100644 index 00000000000..70c47814b88 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/im_tan/im_tan_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .im_tan_post_request_body import ImTanPostRequestBody + +class ImTanRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imTan method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImTanRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imTan", path_parameters) + + async def post(self,body: ImTanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imTan + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImTanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imTan + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImTanRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImTanRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImTanRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImTanRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/imaginary/imaginary_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/imaginary/imaginary_post_request_body.py new file mode 100644 index 00000000000..a5ddd33e70e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/imaginary/imaginary_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ImaginaryPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The inumber property + inumber: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImaginaryPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImaginaryPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImaginaryPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "inumber": lambda n : setattr(self, 'inumber', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("inumber", self.inumber) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/imaginary/imaginary_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/imaginary/imaginary_request_builder.py new file mode 100644 index 00000000000..f861dc87763 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/imaginary/imaginary_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .imaginary_post_request_body import ImaginaryPostRequestBody + +class ImaginaryRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the imaginary method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImaginaryRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/imaginary", path_parameters) + + async def post(self,body: ImaginaryPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action imaginary + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ImaginaryPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action imaginary + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ImaginaryRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImaginaryRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImaginaryRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImaginaryRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int/int_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int/int_post_request_body.py new file mode 100644 index 00000000000..8c8c5ede835 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int/int_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IntPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IntPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IntPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IntPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int/int_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int/int_request_builder.py new file mode 100644 index 00000000000..a3c6493c369 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int/int_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .int_post_request_body import IntPostRequestBody + +class IntRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the int method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IntRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/int", path_parameters) + + async def post(self,body: IntPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action int + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IntPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action int + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IntRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IntRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IntRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IntRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int_rate/int_rate_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int_rate/int_rate_post_request_body.py new file mode 100644 index 00000000000..e2079999f7d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int_rate/int_rate_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IntRatePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The investment property + investment: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The redemption property + redemption: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IntRatePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IntRatePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IntRatePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "investment": lambda n : setattr(self, 'investment', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "redemption": lambda n : setattr(self, 'redemption', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("investment", self.investment) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("redemption", self.redemption) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int_rate/int_rate_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int_rate/int_rate_request_builder.py new file mode 100644 index 00000000000..46f530fdabd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/int_rate/int_rate_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .int_rate_post_request_body import IntRatePostRequestBody + +class IntRateRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the intRate method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IntRateRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/intRate", path_parameters) + + async def post(self,body: IntRatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action intRate + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IntRatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action intRate + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IntRateRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IntRateRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IntRateRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IntRateRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ipmt/ipmt_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ipmt/ipmt_post_request_body.py new file mode 100644 index 00000000000..73990e3fb4a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ipmt/ipmt_post_request_body.py @@ -0,0 +1,76 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IpmtPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fv property + fv: Optional[Json] = None + # The nper property + nper: Optional[Json] = None + # The per property + per: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The type property + type: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IpmtPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IpmtPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IpmtPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "fv": lambda n : setattr(self, 'fv', n.get_object_value(Json)), + "nper": lambda n : setattr(self, 'nper', n.get_object_value(Json)), + "per": lambda n : setattr(self, 'per', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "type": lambda n : setattr(self, 'type', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fv", self.fv) + writer.write_object_value("nper", self.nper) + writer.write_object_value("per", self.per) + writer.write_object_value("pv", self.pv) + writer.write_object_value("rate", self.rate) + writer.write_object_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ipmt/ipmt_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ipmt/ipmt_request_builder.py new file mode 100644 index 00000000000..d5d101d42ff --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ipmt/ipmt_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .ipmt_post_request_body import IpmtPostRequestBody + +class IpmtRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the ipmt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IpmtRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/ipmt", path_parameters) + + async def post(self,body: IpmtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action ipmt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IpmtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action ipmt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IpmtRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IpmtRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IpmtRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IpmtRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/irr/irr_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/irr/irr_post_request_body.py new file mode 100644 index 00000000000..abbfd2dc6fa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/irr/irr_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IrrPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The guess property + guess: Optional[Json] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IrrPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IrrPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IrrPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "guess": lambda n : setattr(self, 'guess', n.get_object_value(Json)), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("guess", self.guess) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/irr/irr_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/irr/irr_request_builder.py new file mode 100644 index 00000000000..45848937803 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/irr/irr_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .irr_post_request_body import IrrPostRequestBody + +class IrrRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the irr method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IrrRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/irr", path_parameters) + + async def post(self,body: IrrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action irr + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IrrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action irr + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IrrRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IrrRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IrrRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IrrRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_err/is_err_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_err/is_err_post_request_body.py new file mode 100644 index 00000000000..e292a0b231e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_err/is_err_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsErrPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsErrPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsErrPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsErrPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_err/is_err_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_err/is_err_request_builder.py new file mode 100644 index 00000000000..1cf9efebbb9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_err/is_err_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .is_err_post_request_body import IsErrPostRequestBody + +class IsErrRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isErr method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsErrRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isErr", path_parameters) + + async def post(self,body: IsErrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isErr + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsErrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isErr + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsErrRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsErrRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsErrRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsErrRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_error/is_error_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_error/is_error_post_request_body.py new file mode 100644 index 00000000000..9b7f477850f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_error/is_error_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsErrorPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsErrorPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsErrorPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsErrorPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_error/is_error_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_error/is_error_request_builder.py new file mode 100644 index 00000000000..5eafbea29b1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_error/is_error_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .is_error_post_request_body import IsErrorPostRequestBody + +class IsErrorRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isError method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsErrorRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isError", path_parameters) + + async def post(self,body: IsErrorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isError + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsErrorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isError + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsErrorRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsErrorRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsErrorRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsErrorRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_even/is_even_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_even/is_even_post_request_body.py new file mode 100644 index 00000000000..ce163ede80d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_even/is_even_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsEvenPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsEvenPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsEvenPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsEvenPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_even/is_even_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_even/is_even_request_builder.py new file mode 100644 index 00000000000..d5075e7856e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_even/is_even_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .is_even_post_request_body import IsEvenPostRequestBody + +class IsEvenRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isEven method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsEvenRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isEven", path_parameters) + + async def post(self,body: IsEvenPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isEven + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsEvenPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isEven + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsEvenRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsEvenRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsEvenRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsEvenRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_formula/is_formula_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_formula/is_formula_post_request_body.py new file mode 100644 index 00000000000..7d8401855af --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_formula/is_formula_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsFormulaPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The reference property + reference: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsFormulaPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsFormulaPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsFormulaPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "reference": lambda n : setattr(self, 'reference', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("reference", self.reference) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_formula/is_formula_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_formula/is_formula_request_builder.py new file mode 100644 index 00000000000..9b98b9af71d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_formula/is_formula_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .is_formula_post_request_body import IsFormulaPostRequestBody + +class IsFormulaRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isFormula method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsFormulaRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isFormula", path_parameters) + + async def post(self,body: IsFormulaPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isFormula + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsFormulaPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isFormula + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsFormulaRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsFormulaRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsFormulaRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsFormulaRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_logical/is_logical_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_logical/is_logical_post_request_body.py new file mode 100644 index 00000000000..4d291395e2a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_logical/is_logical_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsLogicalPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsLogicalPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsLogicalPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsLogicalPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_logical/is_logical_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_logical/is_logical_request_builder.py new file mode 100644 index 00000000000..920ba7cb681 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_logical/is_logical_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .is_logical_post_request_body import IsLogicalPostRequestBody + +class IsLogicalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isLogical method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsLogicalRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isLogical", path_parameters) + + async def post(self,body: IsLogicalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isLogical + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsLogicalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isLogical + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsLogicalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsLogicalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsLogicalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsLogicalRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_n_a/is_n_a_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_n_a/is_n_a_post_request_body.py new file mode 100644 index 00000000000..41742eb2c4f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_n_a/is_n_a_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsNAPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsNAPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsNAPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsNAPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_n_a/is_n_a_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_n_a/is_n_a_request_builder.py new file mode 100644 index 00000000000..7ddec9934d0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_n_a/is_n_a_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .is_n_a_post_request_body import IsNAPostRequestBody + +class IsNARequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isNA method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsNARequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isNA", path_parameters) + + async def post(self,body: IsNAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isNA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsNAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isNA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsNARequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsNARequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsNARequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsNARequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_non_text/is_non_text_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_non_text/is_non_text_post_request_body.py new file mode 100644 index 00000000000..9ca17b89c09 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_non_text/is_non_text_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsNonTextPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsNonTextPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsNonTextPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsNonTextPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_non_text/is_non_text_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_non_text/is_non_text_request_builder.py new file mode 100644 index 00000000000..d6df9ecb270 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_non_text/is_non_text_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .is_non_text_post_request_body import IsNonTextPostRequestBody + +class IsNonTextRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isNonText method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsNonTextRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isNonText", path_parameters) + + async def post(self,body: IsNonTextPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isNonText + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsNonTextPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isNonText + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsNonTextRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsNonTextRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsNonTextRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsNonTextRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_number/is_number_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_number/is_number_post_request_body.py new file mode 100644 index 00000000000..91bc1fdc9a9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_number/is_number_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsNumberPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsNumberPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsNumberPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsNumberPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_number/is_number_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_number/is_number_request_builder.py new file mode 100644 index 00000000000..e6c6441a995 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_number/is_number_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .is_number_post_request_body import IsNumberPostRequestBody + +class IsNumberRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isNumber method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsNumberRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isNumber", path_parameters) + + async def post(self,body: IsNumberPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isNumber + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsNumberPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isNumber + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsNumberRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsNumberRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsNumberRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsNumberRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_odd/is_odd_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_odd/is_odd_post_request_body.py new file mode 100644 index 00000000000..0994ef99dfc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_odd/is_odd_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsOddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsOddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsOddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsOddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_odd/is_odd_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_odd/is_odd_request_builder.py new file mode 100644 index 00000000000..9b302b96db6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_odd/is_odd_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .is_odd_post_request_body import IsOddPostRequestBody + +class IsOddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isOdd method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsOddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isOdd", path_parameters) + + async def post(self,body: IsOddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isOdd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsOddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isOdd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsOddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsOddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsOddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsOddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_text/is_text_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_text/is_text_post_request_body.py new file mode 100644 index 00000000000..f7698823d74 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_text/is_text_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsTextPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsTextPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsTextPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsTextPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_text/is_text_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_text/is_text_request_builder.py new file mode 100644 index 00000000000..1c8557c585d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/is_text/is_text_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .is_text_post_request_body import IsTextPostRequestBody + +class IsTextRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isText method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsTextRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isText", path_parameters) + + async def post(self,body: IsTextPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isText + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsTextPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isText + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsTextRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsTextRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsTextRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsTextRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_ceiling/iso_ceiling_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_ceiling/iso_ceiling_post_request_body.py new file mode 100644 index 00000000000..b6ed4defe99 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_ceiling/iso_ceiling_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Iso_CeilingPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The significance property + significance: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Iso_CeilingPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Iso_CeilingPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Iso_CeilingPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "significance": lambda n : setattr(self, 'significance', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("significance", self.significance) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_ceiling/iso_ceiling_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_ceiling/iso_ceiling_request_builder.py new file mode 100644 index 00000000000..63abad8c366 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_ceiling/iso_ceiling_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .iso_ceiling_post_request_body import Iso_CeilingPostRequestBody + +class Iso_CeilingRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the iso_Ceiling method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Iso_CeilingRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/iso_Ceiling", path_parameters) + + async def post(self,body: Iso_CeilingPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action iso_Ceiling + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Iso_CeilingPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action iso_Ceiling + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Iso_CeilingRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Iso_CeilingRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Iso_CeilingRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Iso_CeilingRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_week_num/iso_week_num_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_week_num/iso_week_num_post_request_body.py new file mode 100644 index 00000000000..314529edbad --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_week_num/iso_week_num_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsoWeekNumPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The date property + date: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsoWeekNumPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsoWeekNumPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsoWeekNumPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "date": lambda n : setattr(self, 'date', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("date", self.date) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_week_num/iso_week_num_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_week_num/iso_week_num_request_builder.py new file mode 100644 index 00000000000..45d6f9d550d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/iso_week_num/iso_week_num_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .iso_week_num_post_request_body import IsoWeekNumPostRequestBody + +class IsoWeekNumRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isoWeekNum method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsoWeekNumRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isoWeekNum", path_parameters) + + async def post(self,body: IsoWeekNumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isoWeekNum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsoWeekNumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isoWeekNum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsoWeekNumRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsoWeekNumRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsoWeekNumRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsoWeekNumRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ispmt/ispmt_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ispmt/ispmt_post_request_body.py new file mode 100644 index 00000000000..a6ea1765abd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ispmt/ispmt_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IspmtPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The nper property + nper: Optional[Json] = None + # The per property + per: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IspmtPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IspmtPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IspmtPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "nper": lambda n : setattr(self, 'nper', n.get_object_value(Json)), + "per": lambda n : setattr(self, 'per', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("nper", self.nper) + writer.write_object_value("per", self.per) + writer.write_object_value("pv", self.pv) + writer.write_object_value("rate", self.rate) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ispmt/ispmt_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ispmt/ispmt_request_builder.py new file mode 100644 index 00000000000..944d6b4cc12 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ispmt/ispmt_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .ispmt_post_request_body import IspmtPostRequestBody + +class IspmtRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the ispmt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IspmtRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/ispmt", path_parameters) + + async def post(self,body: IspmtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action ispmt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IspmtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action ispmt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IspmtRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IspmtRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IspmtRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IspmtRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/isref/isref_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/isref/isref_post_request_body.py new file mode 100644 index 00000000000..583d4503a6b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/isref/isref_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class IsrefPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsrefPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsrefPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsrefPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/isref/isref_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/isref/isref_request_builder.py new file mode 100644 index 00000000000..cac12623f41 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/isref/isref_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .isref_post_request_body import IsrefPostRequestBody + +class IsrefRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isref method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsrefRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/isref", path_parameters) + + async def post(self,body: IsrefPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action isref + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: IsrefPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action isref + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> IsrefRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsrefRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsrefRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsrefRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/kurt/kurt_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/kurt/kurt_post_request_body.py new file mode 100644 index 00000000000..09fb1fa5d86 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/kurt/kurt_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class KurtPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> KurtPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: KurtPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return KurtPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/kurt/kurt_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/kurt/kurt_request_builder.py new file mode 100644 index 00000000000..55df1bfd32f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/kurt/kurt_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .kurt_post_request_body import KurtPostRequestBody + +class KurtRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the kurt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new KurtRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/kurt", path_parameters) + + async def post(self,body: KurtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action kurt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: KurtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action kurt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> KurtRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: KurtRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return KurtRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class KurtRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/large/large_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/large/large_post_request_body.py new file mode 100644 index 00000000000..b3047072e29 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/large/large_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LargePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + # The k property + k: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LargePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LargePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LargePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + "k": lambda n : setattr(self, 'k', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_object_value("k", self.k) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/large/large_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/large/large_request_builder.py new file mode 100644 index 00000000000..7cdada405c8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/large/large_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .large_post_request_body import LargePostRequestBody + +class LargeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the large method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LargeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/large", path_parameters) + + async def post(self,body: LargePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action large + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LargePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action large + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LargeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LargeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LargeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LargeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lcm/lcm_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lcm/lcm_post_request_body.py new file mode 100644 index 00000000000..5afa73841d1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lcm/lcm_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LcmPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LcmPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LcmPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LcmPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lcm/lcm_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lcm/lcm_request_builder.py new file mode 100644 index 00000000000..44901133608 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lcm/lcm_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .lcm_post_request_body import LcmPostRequestBody + +class LcmRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the lcm method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LcmRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/lcm", path_parameters) + + async def post(self,body: LcmPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action lcm + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LcmPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action lcm + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LcmRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LcmRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LcmRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LcmRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/left/left_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/left/left_post_request_body.py new file mode 100644 index 00000000000..e36fa7b0c7f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/left/left_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LeftPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numChars property + num_chars: Optional[Json] = None + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LeftPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LeftPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LeftPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numChars": lambda n : setattr(self, 'num_chars', n.get_object_value(Json)), + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numChars", self.num_chars) + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/left/left_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/left/left_request_builder.py new file mode 100644 index 00000000000..ae538237828 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/left/left_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .left_post_request_body import LeftPostRequestBody + +class LeftRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the left method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LeftRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/left", path_parameters) + + async def post(self,body: LeftPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action left + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LeftPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action left + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LeftRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LeftRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LeftRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LeftRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/leftb/leftb_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/leftb/leftb_post_request_body.py new file mode 100644 index 00000000000..53c4e892568 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/leftb/leftb_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LeftbPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numBytes property + num_bytes: Optional[Json] = None + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LeftbPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LeftbPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LeftbPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numBytes": lambda n : setattr(self, 'num_bytes', n.get_object_value(Json)), + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numBytes", self.num_bytes) + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/leftb/leftb_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/leftb/leftb_request_builder.py new file mode 100644 index 00000000000..960f410ca50 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/leftb/leftb_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .leftb_post_request_body import LeftbPostRequestBody + +class LeftbRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the leftb method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LeftbRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/leftb", path_parameters) + + async def post(self,body: LeftbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action leftb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LeftbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action leftb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LeftbRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LeftbRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LeftbRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LeftbRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/len/len_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/len/len_post_request_body.py new file mode 100644 index 00000000000..456ab42a817 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/len/len_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LenPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LenPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LenPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LenPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/len/len_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/len/len_request_builder.py new file mode 100644 index 00000000000..eab0c0ffde1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/len/len_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .len_post_request_body import LenPostRequestBody + +class LenRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the len method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LenRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/len", path_parameters) + + async def post(self,body: LenPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action len + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LenPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action len + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LenRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LenRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LenRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LenRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lenb/lenb_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lenb/lenb_post_request_body.py new file mode 100644 index 00000000000..c7dbcdf5a4e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lenb/lenb_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LenbPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LenbPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LenbPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LenbPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lenb/lenb_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lenb/lenb_request_builder.py new file mode 100644 index 00000000000..ea6dcd88612 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lenb/lenb_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .lenb_post_request_body import LenbPostRequestBody + +class LenbRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the lenb method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LenbRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/lenb", path_parameters) + + async def post(self,body: LenbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action lenb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LenbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action lenb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LenbRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LenbRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LenbRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LenbRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ln/ln_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ln/ln_post_request_body.py new file mode 100644 index 00000000000..2cca680bdf5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ln/ln_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LnPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LnPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LnPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LnPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ln/ln_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ln/ln_request_builder.py new file mode 100644 index 00000000000..5b166a6c03c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ln/ln_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .ln_post_request_body import LnPostRequestBody + +class LnRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the ln method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LnRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/ln", path_parameters) + + async def post(self,body: LnPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action ln + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LnPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action ln + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LnRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LnRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LnRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LnRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log/log_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log/log_post_request_body.py new file mode 100644 index 00000000000..019533a34e8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log/log_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LogPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The base property + base: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LogPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LogPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LogPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "base": lambda n : setattr(self, 'base', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("base", self.base) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log/log_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log/log_request_builder.py new file mode 100644 index 00000000000..a3d90a48c6e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log/log_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .log_post_request_body import LogPostRequestBody + +class LogRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the log method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LogRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/log", path_parameters) + + async def post(self,body: LogPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action log + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LogPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action log + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LogRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LogRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LogRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LogRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log10/log10_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log10/log10_post_request_body.py new file mode 100644 index 00000000000..052c2a16e31 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log10/log10_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Log10PostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Log10PostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Log10PostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Log10PostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log10/log10_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log10/log10_request_builder.py new file mode 100644 index 00000000000..de41fc739c1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log10/log10_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .log10_post_request_body import Log10PostRequestBody + +class Log10RequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the log10 method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Log10RequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/log10", path_parameters) + + async def post(self,body: Log10PostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action log10 + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Log10PostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action log10 + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Log10RequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Log10RequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Log10RequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Log10RequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_dist/log_norm_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_dist/log_norm_dist_post_request_body.py new file mode 100644 index 00000000000..fecb307355b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_dist/log_norm_dist_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LogNorm_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The mean property + mean: Optional[Json] = None + # The standardDev property + standard_dev: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LogNorm_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LogNorm_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LogNorm_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "mean": lambda n : setattr(self, 'mean', n.get_object_value(Json)), + "standardDev": lambda n : setattr(self, 'standard_dev', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("mean", self.mean) + writer.write_object_value("standardDev", self.standard_dev) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_dist/log_norm_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_dist/log_norm_dist_request_builder.py new file mode 100644 index 00000000000..f93217e76a2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_dist/log_norm_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .log_norm_dist_post_request_body import LogNorm_DistPostRequestBody + +class LogNorm_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the logNorm_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LogNorm_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/logNorm_Dist", path_parameters) + + async def post(self,body: LogNorm_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action logNorm_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LogNorm_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action logNorm_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LogNorm_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LogNorm_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LogNorm_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LogNorm_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_inv/log_norm_inv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_inv/log_norm_inv_post_request_body.py new file mode 100644 index 00000000000..b6c174f6cf1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_inv/log_norm_inv_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LogNorm_InvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The mean property + mean: Optional[Json] = None + # The probability property + probability: Optional[Json] = None + # The standardDev property + standard_dev: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LogNorm_InvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LogNorm_InvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LogNorm_InvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "mean": lambda n : setattr(self, 'mean', n.get_object_value(Json)), + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + "standardDev": lambda n : setattr(self, 'standard_dev', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("mean", self.mean) + writer.write_object_value("probability", self.probability) + writer.write_object_value("standardDev", self.standard_dev) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_inv/log_norm_inv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_inv/log_norm_inv_request_builder.py new file mode 100644 index 00000000000..98ed7eb3c3d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/log_norm_inv/log_norm_inv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .log_norm_inv_post_request_body import LogNorm_InvPostRequestBody + +class LogNorm_InvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the logNorm_Inv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LogNorm_InvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/logNorm_Inv", path_parameters) + + async def post(self,body: LogNorm_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action logNorm_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LogNorm_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action logNorm_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LogNorm_InvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LogNorm_InvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LogNorm_InvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LogNorm_InvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lookup/lookup_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lookup/lookup_post_request_body.py new file mode 100644 index 00000000000..1d42068d7ae --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lookup/lookup_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LookupPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The lookupValue property + lookup_value: Optional[Json] = None + # The lookupVector property + lookup_vector: Optional[Json] = None + # The resultVector property + result_vector: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LookupPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LookupPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LookupPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "lookupValue": lambda n : setattr(self, 'lookup_value', n.get_object_value(Json)), + "lookupVector": lambda n : setattr(self, 'lookup_vector', n.get_object_value(Json)), + "resultVector": lambda n : setattr(self, 'result_vector', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("lookupValue", self.lookup_value) + writer.write_object_value("lookupVector", self.lookup_vector) + writer.write_object_value("resultVector", self.result_vector) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lookup/lookup_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lookup/lookup_request_builder.py new file mode 100644 index 00000000000..2ace7b3c302 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lookup/lookup_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .lookup_post_request_body import LookupPostRequestBody + +class LookupRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the lookup method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LookupRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/lookup", path_parameters) + + async def post(self,body: LookupPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action lookup + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LookupPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action lookup + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LookupRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LookupRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LookupRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LookupRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lower/lower_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lower/lower_post_request_body.py new file mode 100644 index 00000000000..b47759c15ee --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lower/lower_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class LowerPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> LowerPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: LowerPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return LowerPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lower/lower_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lower/lower_request_builder.py new file mode 100644 index 00000000000..1f10e09c682 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/lower/lower_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .lower_post_request_body import LowerPostRequestBody + +class LowerRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the lower method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LowerRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/lower", path_parameters) + + async def post(self,body: LowerPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action lower + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: LowerPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action lower + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LowerRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LowerRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LowerRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LowerRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/match/match_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/match/match_post_request_body.py new file mode 100644 index 00000000000..7394c3c76d5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/match/match_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MatchPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The lookupArray property + lookup_array: Optional[Json] = None + # The lookupValue property + lookup_value: Optional[Json] = None + # The matchType property + match_type: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MatchPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MatchPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MatchPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "lookupArray": lambda n : setattr(self, 'lookup_array', n.get_object_value(Json)), + "lookupValue": lambda n : setattr(self, 'lookup_value', n.get_object_value(Json)), + "matchType": lambda n : setattr(self, 'match_type', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("lookupArray", self.lookup_array) + writer.write_object_value("lookupValue", self.lookup_value) + writer.write_object_value("matchType", self.match_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/match/match_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/match/match_request_builder.py new file mode 100644 index 00000000000..73a2fedf643 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/match/match_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .match_post_request_body import MatchPostRequestBody + +class MatchRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the match method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MatchRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/match", path_parameters) + + async def post(self,body: MatchPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action match + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MatchPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action match + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MatchRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MatchRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MatchRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MatchRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max/max_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max/max_post_request_body.py new file mode 100644 index 00000000000..b03e5967892 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max/max_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MaxPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MaxPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MaxPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MaxPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max/max_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max/max_request_builder.py new file mode 100644 index 00000000000..de0fe068eb3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max/max_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .max_post_request_body import MaxPostRequestBody + +class MaxRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the max method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MaxRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/max", path_parameters) + + async def post(self,body: MaxPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action max + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MaxPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action max + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MaxRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MaxRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MaxRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MaxRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max_a/max_a_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max_a/max_a_post_request_body.py new file mode 100644 index 00000000000..ed0c1c7bd07 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max_a/max_a_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MaxAPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MaxAPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MaxAPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MaxAPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max_a/max_a_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max_a/max_a_request_builder.py new file mode 100644 index 00000000000..874f6215e4b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/max_a/max_a_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .max_a_post_request_body import MaxAPostRequestBody + +class MaxARequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the maxA method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MaxARequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/maxA", path_parameters) + + async def post(self,body: MaxAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action maxA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MaxAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action maxA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MaxARequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MaxARequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MaxARequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MaxARequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mduration/mduration_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mduration/mduration_post_request_body.py new file mode 100644 index 00000000000..19f2210a353 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mduration/mduration_post_request_body.py @@ -0,0 +1,76 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MdurationPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The coupon property + coupon: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + # The yld property + yld: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MdurationPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MdurationPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MdurationPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "coupon": lambda n : setattr(self, 'coupon', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + "yld": lambda n : setattr(self, 'yld', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("coupon", self.coupon) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_object_value("yld", self.yld) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mduration/mduration_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mduration/mduration_request_builder.py new file mode 100644 index 00000000000..cd24621962b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mduration/mduration_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .mduration_post_request_body import MdurationPostRequestBody + +class MdurationRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the mduration method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MdurationRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/mduration", path_parameters) + + async def post(self,body: MdurationPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action mduration + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MdurationPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action mduration + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MdurationRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MdurationRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MdurationRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MdurationRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/median/median_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/median/median_post_request_body.py new file mode 100644 index 00000000000..934a0c7ea92 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/median/median_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MedianPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MedianPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MedianPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MedianPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/median/median_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/median/median_request_builder.py new file mode 100644 index 00000000000..4f15ce14888 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/median/median_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .median_post_request_body import MedianPostRequestBody + +class MedianRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the median method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MedianRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/median", path_parameters) + + async def post(self,body: MedianPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action median + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MedianPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action median + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MedianRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MedianRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MedianRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MedianRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mid/mid_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mid/mid_post_request_body.py new file mode 100644 index 00000000000..6b0e2bc1287 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mid/mid_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MidPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numChars property + num_chars: Optional[Json] = None + # The startNum property + start_num: Optional[Json] = None + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MidPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MidPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MidPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numChars": lambda n : setattr(self, 'num_chars', n.get_object_value(Json)), + "startNum": lambda n : setattr(self, 'start_num', n.get_object_value(Json)), + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numChars", self.num_chars) + writer.write_object_value("startNum", self.start_num) + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mid/mid_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mid/mid_request_builder.py new file mode 100644 index 00000000000..3f824ca186f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mid/mid_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .mid_post_request_body import MidPostRequestBody + +class MidRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the mid method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MidRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/mid", path_parameters) + + async def post(self,body: MidPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action mid + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MidPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action mid + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MidRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MidRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MidRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MidRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/midb/midb_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/midb/midb_post_request_body.py new file mode 100644 index 00000000000..a0b5f3d3493 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/midb/midb_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MidbPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numBytes property + num_bytes: Optional[Json] = None + # The startNum property + start_num: Optional[Json] = None + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MidbPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MidbPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MidbPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numBytes": lambda n : setattr(self, 'num_bytes', n.get_object_value(Json)), + "startNum": lambda n : setattr(self, 'start_num', n.get_object_value(Json)), + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numBytes", self.num_bytes) + writer.write_object_value("startNum", self.start_num) + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/midb/midb_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/midb/midb_request_builder.py new file mode 100644 index 00000000000..7bdb4664b18 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/midb/midb_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .midb_post_request_body import MidbPostRequestBody + +class MidbRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the midb method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MidbRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/midb", path_parameters) + + async def post(self,body: MidbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action midb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MidbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action midb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MidbRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MidbRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MidbRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MidbRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min/min_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min/min_post_request_body.py new file mode 100644 index 00000000000..fb0178f5d38 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min/min_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MinPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MinPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MinPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MinPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min/min_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min/min_request_builder.py new file mode 100644 index 00000000000..14721d09bc3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min/min_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .min_post_request_body import MinPostRequestBody + +class MinRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the min method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MinRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/min", path_parameters) + + async def post(self,body: MinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action min + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action min + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MinRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MinRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MinRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MinRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min_a/min_a_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min_a/min_a_post_request_body.py new file mode 100644 index 00000000000..9f5af27b8ee --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min_a/min_a_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MinAPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MinAPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MinAPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MinAPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min_a/min_a_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min_a/min_a_request_builder.py new file mode 100644 index 00000000000..cb759a66df9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/min_a/min_a_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .min_a_post_request_body import MinAPostRequestBody + +class MinARequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the minA method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MinARequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/minA", path_parameters) + + async def post(self,body: MinAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action minA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MinAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action minA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MinARequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MinARequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MinARequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MinARequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/minute/minute_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/minute/minute_post_request_body.py new file mode 100644 index 00000000000..a7360a42db1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/minute/minute_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MinutePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The serialNumber property + serial_number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MinutePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MinutePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MinutePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "serialNumber": lambda n : setattr(self, 'serial_number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("serialNumber", self.serial_number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/minute/minute_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/minute/minute_request_builder.py new file mode 100644 index 00000000000..f4ae4d59d0f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/minute/minute_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .minute_post_request_body import MinutePostRequestBody + +class MinuteRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the minute method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MinuteRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/minute", path_parameters) + + async def post(self,body: MinutePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action minute + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MinutePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action minute + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MinuteRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MinuteRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MinuteRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MinuteRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mirr/mirr_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mirr/mirr_post_request_body.py new file mode 100644 index 00000000000..41299f3d4cb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mirr/mirr_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MirrPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The financeRate property + finance_rate: Optional[Json] = None + # The reinvestRate property + reinvest_rate: Optional[Json] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MirrPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MirrPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MirrPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "financeRate": lambda n : setattr(self, 'finance_rate', n.get_object_value(Json)), + "reinvestRate": lambda n : setattr(self, 'reinvest_rate', n.get_object_value(Json)), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("financeRate", self.finance_rate) + writer.write_object_value("reinvestRate", self.reinvest_rate) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mirr/mirr_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mirr/mirr_request_builder.py new file mode 100644 index 00000000000..126e5f4d980 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mirr/mirr_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .mirr_post_request_body import MirrPostRequestBody + +class MirrRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the mirr method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MirrRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/mirr", path_parameters) + + async def post(self,body: MirrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action mirr + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MirrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action mirr + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MirrRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MirrRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MirrRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MirrRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mod/mod_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mod/mod_post_request_body.py new file mode 100644 index 00000000000..dd4f0dcfa3f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mod/mod_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ModPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The divisor property + divisor: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ModPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ModPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ModPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "divisor": lambda n : setattr(self, 'divisor', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("divisor", self.divisor) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mod/mod_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mod/mod_request_builder.py new file mode 100644 index 00000000000..89d2b1e40e0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mod/mod_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .mod_post_request_body import ModPostRequestBody + +class ModRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the mod method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ModRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/mod", path_parameters) + + async def post(self,body: ModPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action mod + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ModPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action mod + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ModRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ModRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ModRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ModRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/month/month_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/month/month_post_request_body.py new file mode 100644 index 00000000000..e717e163f93 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/month/month_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MonthPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The serialNumber property + serial_number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MonthPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MonthPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MonthPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "serialNumber": lambda n : setattr(self, 'serial_number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("serialNumber", self.serial_number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/month/month_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/month/month_request_builder.py new file mode 100644 index 00000000000..3648ab50fa5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/month/month_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .month_post_request_body import MonthPostRequestBody + +class MonthRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the month method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MonthRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/month", path_parameters) + + async def post(self,body: MonthPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action month + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MonthPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action month + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MonthRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MonthRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MonthRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MonthRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mround/mround_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mround/mround_post_request_body.py new file mode 100644 index 00000000000..feeca7bcbf0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mround/mround_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MroundPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The multiple property + multiple: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MroundPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MroundPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MroundPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "multiple": lambda n : setattr(self, 'multiple', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("multiple", self.multiple) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mround/mround_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mround/mround_request_builder.py new file mode 100644 index 00000000000..c92d9819570 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/mround/mround_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .mround_post_request_body import MroundPostRequestBody + +class MroundRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the mround method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MroundRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/mround", path_parameters) + + async def post(self,body: MroundPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action mround + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MroundPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action mround + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MroundRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MroundRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MroundRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MroundRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/multi_nomial/multi_nomial_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/multi_nomial/multi_nomial_post_request_body.py new file mode 100644 index 00000000000..fb3a4fdb02d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/multi_nomial/multi_nomial_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class MultiNomialPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> MultiNomialPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: MultiNomialPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return MultiNomialPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/multi_nomial/multi_nomial_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/multi_nomial/multi_nomial_request_builder.py new file mode 100644 index 00000000000..60f3875f44a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/multi_nomial/multi_nomial_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .multi_nomial_post_request_body import MultiNomialPostRequestBody + +class MultiNomialRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the multiNomial method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MultiNomialRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/multiNomial", path_parameters) + + async def post(self,body: MultiNomialPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action multiNomial + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: MultiNomialPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action multiNomial + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MultiNomialRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MultiNomialRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MultiNomialRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MultiNomialRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/n/n_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/n/n_post_request_body.py new file mode 100644 index 00000000000..faaad8999d1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/n/n_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class NPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> NPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/n/n_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/n/n_request_builder.py new file mode 100644 index 00000000000..32130033246 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/n/n_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .n_post_request_body import NPostRequestBody + +class NRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the n method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/n", path_parameters) + + async def post(self,body: NPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action n + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: NPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action n + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/na/na_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/na/na_request_builder.py new file mode 100644 index 00000000000..dacc3013f43 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/na/na_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + +class NaRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the na method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NaRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/na", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action na + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action na + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> NaRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NaRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NaRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NaRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_post_request_body.py new file mode 100644 index 00000000000..0e779c69619 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class NegBinom_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The numberF property + number_f: Optional[Json] = None + # The numberS property + number_s: Optional[Json] = None + # The probabilityS property + probability_s: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> NegBinom_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NegBinom_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NegBinom_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "numberF": lambda n : setattr(self, 'number_f', n.get_object_value(Json)), + "numberS": lambda n : setattr(self, 'number_s', n.get_object_value(Json)), + "probabilityS": lambda n : setattr(self, 'probability_s', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("numberF", self.number_f) + writer.write_object_value("numberS", self.number_s) + writer.write_object_value("probabilityS", self.probability_s) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_request_builder.py new file mode 100644 index 00000000000..20d5c53e1df --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/neg_binom_dist/neg_binom_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .neg_binom_dist_post_request_body import NegBinom_DistPostRequestBody + +class NegBinom_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the negBinom_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NegBinom_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/negBinom_Dist", path_parameters) + + async def post(self,body: NegBinom_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action negBinom_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: NegBinom_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action negBinom_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NegBinom_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NegBinom_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NegBinom_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NegBinom_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days/network_days_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days/network_days_post_request_body.py new file mode 100644 index 00000000000..282ed88ad40 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days/network_days_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class NetworkDaysPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The endDate property + end_date: Optional[Json] = None + # The holidays property + holidays: Optional[Json] = None + # The startDate property + start_date: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> NetworkDaysPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NetworkDaysPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NetworkDaysPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "endDate": lambda n : setattr(self, 'end_date', n.get_object_value(Json)), + "holidays": lambda n : setattr(self, 'holidays', n.get_object_value(Json)), + "startDate": lambda n : setattr(self, 'start_date', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("endDate", self.end_date) + writer.write_object_value("holidays", self.holidays) + writer.write_object_value("startDate", self.start_date) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days/network_days_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days/network_days_request_builder.py new file mode 100644 index 00000000000..e4cb66a2d67 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days/network_days_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .network_days_post_request_body import NetworkDaysPostRequestBody + +class NetworkDaysRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the networkDays method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NetworkDaysRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/networkDays", path_parameters) + + async def post(self,body: NetworkDaysPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action networkDays + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: NetworkDaysPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action networkDays + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NetworkDaysRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NetworkDaysRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NetworkDaysRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NetworkDaysRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days_intl/network_days_intl_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days_intl/network_days_intl_post_request_body.py new file mode 100644 index 00000000000..6cca251b9a3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days_intl/network_days_intl_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class NetworkDays_IntlPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The endDate property + end_date: Optional[Json] = None + # The holidays property + holidays: Optional[Json] = None + # The startDate property + start_date: Optional[Json] = None + # The weekend property + weekend: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> NetworkDays_IntlPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NetworkDays_IntlPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NetworkDays_IntlPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "endDate": lambda n : setattr(self, 'end_date', n.get_object_value(Json)), + "holidays": lambda n : setattr(self, 'holidays', n.get_object_value(Json)), + "startDate": lambda n : setattr(self, 'start_date', n.get_object_value(Json)), + "weekend": lambda n : setattr(self, 'weekend', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("endDate", self.end_date) + writer.write_object_value("holidays", self.holidays) + writer.write_object_value("startDate", self.start_date) + writer.write_object_value("weekend", self.weekend) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days_intl/network_days_intl_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days_intl/network_days_intl_request_builder.py new file mode 100644 index 00000000000..876fb05c12d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/network_days_intl/network_days_intl_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .network_days_intl_post_request_body import NetworkDays_IntlPostRequestBody + +class NetworkDays_IntlRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the networkDays_Intl method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NetworkDays_IntlRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/networkDays_Intl", path_parameters) + + async def post(self,body: NetworkDays_IntlPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action networkDays_Intl + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: NetworkDays_IntlPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action networkDays_Intl + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NetworkDays_IntlRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NetworkDays_IntlRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NetworkDays_IntlRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NetworkDays_IntlRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nominal/nominal_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nominal/nominal_post_request_body.py new file mode 100644 index 00000000000..35d80c699f9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nominal/nominal_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class NominalPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The effectRate property + effect_rate: Optional[Json] = None + # The npery property + npery: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> NominalPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NominalPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NominalPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "effectRate": lambda n : setattr(self, 'effect_rate', n.get_object_value(Json)), + "npery": lambda n : setattr(self, 'npery', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("effectRate", self.effect_rate) + writer.write_object_value("npery", self.npery) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nominal/nominal_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nominal/nominal_request_builder.py new file mode 100644 index 00000000000..021f35256bb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nominal/nominal_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .nominal_post_request_body import NominalPostRequestBody + +class NominalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the nominal method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NominalRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/nominal", path_parameters) + + async def post(self,body: NominalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action nominal + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: NominalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action nominal + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NominalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NominalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NominalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NominalRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_dist/norm_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_dist/norm_dist_post_request_body.py new file mode 100644 index 00000000000..5276b15fa39 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_dist/norm_dist_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Norm_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The mean property + mean: Optional[Json] = None + # The standardDev property + standard_dev: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Norm_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Norm_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Norm_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "mean": lambda n : setattr(self, 'mean', n.get_object_value(Json)), + "standardDev": lambda n : setattr(self, 'standard_dev', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("mean", self.mean) + writer.write_object_value("standardDev", self.standard_dev) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_dist/norm_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_dist/norm_dist_request_builder.py new file mode 100644 index 00000000000..a4aa99196f4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_dist/norm_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .norm_dist_post_request_body import Norm_DistPostRequestBody + +class Norm_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the norm_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Norm_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/norm_Dist", path_parameters) + + async def post(self,body: Norm_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action norm_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Norm_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action norm_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Norm_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Norm_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Norm_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Norm_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_inv/norm_inv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_inv/norm_inv_post_request_body.py new file mode 100644 index 00000000000..5c1e69b7eaa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_inv/norm_inv_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Norm_InvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The mean property + mean: Optional[Json] = None + # The probability property + probability: Optional[Json] = None + # The standardDev property + standard_dev: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Norm_InvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Norm_InvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Norm_InvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "mean": lambda n : setattr(self, 'mean', n.get_object_value(Json)), + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + "standardDev": lambda n : setattr(self, 'standard_dev', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("mean", self.mean) + writer.write_object_value("probability", self.probability) + writer.write_object_value("standardDev", self.standard_dev) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_inv/norm_inv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_inv/norm_inv_request_builder.py new file mode 100644 index 00000000000..896f7c01547 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_inv/norm_inv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .norm_inv_post_request_body import Norm_InvPostRequestBody + +class Norm_InvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the norm_Inv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Norm_InvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/norm_Inv", path_parameters) + + async def post(self,body: Norm_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action norm_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Norm_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action norm_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Norm_InvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Norm_InvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Norm_InvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Norm_InvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_dist/norm_s_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_dist/norm_s_dist_post_request_body.py new file mode 100644 index 00000000000..62361b89ea3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_dist/norm_s_dist_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Norm_S_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The z property + z: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Norm_S_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Norm_S_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Norm_S_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "z": lambda n : setattr(self, 'z', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("z", self.z) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_dist/norm_s_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_dist/norm_s_dist_request_builder.py new file mode 100644 index 00000000000..ba122429b15 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_dist/norm_s_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .norm_s_dist_post_request_body import Norm_S_DistPostRequestBody + +class Norm_S_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the norm_S_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Norm_S_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/norm_S_Dist", path_parameters) + + async def post(self,body: Norm_S_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action norm_S_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Norm_S_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action norm_S_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Norm_S_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Norm_S_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Norm_S_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Norm_S_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_inv/norm_s_inv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_inv/norm_s_inv_post_request_body.py new file mode 100644 index 00000000000..b86f1f46fd5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_inv/norm_s_inv_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Norm_S_InvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The probability property + probability: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Norm_S_InvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Norm_S_InvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Norm_S_InvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("probability", self.probability) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_inv/norm_s_inv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_inv/norm_s_inv_request_builder.py new file mode 100644 index 00000000000..0cf437ed547 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/norm_s_inv/norm_s_inv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .norm_s_inv_post_request_body import Norm_S_InvPostRequestBody + +class Norm_S_InvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the norm_S_Inv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Norm_S_InvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/norm_S_Inv", path_parameters) + + async def post(self,body: Norm_S_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action norm_S_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Norm_S_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action norm_S_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Norm_S_InvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Norm_S_InvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Norm_S_InvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Norm_S_InvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/not_/not_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/not_/not_post_request_body.py new file mode 100644 index 00000000000..ab20c82d4bc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/not_/not_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class NotPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The logical property + logical: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> NotPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NotPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NotPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "logical": lambda n : setattr(self, 'logical', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("logical", self.logical) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/not_/not_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/not_/not_request_builder.py new file mode 100644 index 00000000000..5496aca61ca --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/not_/not_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .not_post_request_body import NotPostRequestBody + +class NotRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the not method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NotRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/not", path_parameters) + + async def post(self,body: NotPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action not + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: NotPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action not + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NotRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NotRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NotRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NotRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/now/now_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/now/now_request_builder.py new file mode 100644 index 00000000000..ab9adbf2f69 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/now/now_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + +class NowRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the now method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NowRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/now", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action now + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action now + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> NowRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NowRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NowRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NowRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nper/nper_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nper/nper_post_request_body.py new file mode 100644 index 00000000000..e746e18b27c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nper/nper_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class NperPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fv property + fv: Optional[Json] = None + # The pmt property + pmt: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The type property + type: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> NperPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NperPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NperPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "fv": lambda n : setattr(self, 'fv', n.get_object_value(Json)), + "pmt": lambda n : setattr(self, 'pmt', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "type": lambda n : setattr(self, 'type', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fv", self.fv) + writer.write_object_value("pmt", self.pmt) + writer.write_object_value("pv", self.pv) + writer.write_object_value("rate", self.rate) + writer.write_object_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nper/nper_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nper/nper_request_builder.py new file mode 100644 index 00000000000..68b2cb460ad --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/nper/nper_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .nper_post_request_body import NperPostRequestBody + +class NperRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the nper method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NperRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/nper", path_parameters) + + async def post(self,body: NperPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action nper + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: NperPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action nper + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NperRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NperRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NperRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NperRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/npv/npv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/npv/npv_post_request_body.py new file mode 100644 index 00000000000..8d0e73b5af5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/npv/npv_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class NpvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The rate property + rate: Optional[Json] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> NpvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NpvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NpvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("rate", self.rate) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/npv/npv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/npv/npv_request_builder.py new file mode 100644 index 00000000000..ca942ba8063 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/npv/npv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .npv_post_request_body import NpvPostRequestBody + +class NpvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the npv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NpvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/npv", path_parameters) + + async def post(self,body: NpvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action npv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: NpvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action npv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NpvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NpvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NpvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NpvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/number_value/number_value_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/number_value/number_value_post_request_body.py new file mode 100644 index 00000000000..8d111ad931f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/number_value/number_value_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class NumberValuePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The decimalSeparator property + decimal_separator: Optional[Json] = None + # The groupSeparator property + group_separator: Optional[Json] = None + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> NumberValuePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: NumberValuePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return NumberValuePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "decimalSeparator": lambda n : setattr(self, 'decimal_separator', n.get_object_value(Json)), + "groupSeparator": lambda n : setattr(self, 'group_separator', n.get_object_value(Json)), + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("decimalSeparator", self.decimal_separator) + writer.write_object_value("groupSeparator", self.group_separator) + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/number_value/number_value_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/number_value/number_value_request_builder.py new file mode 100644 index 00000000000..a30428cd7d6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/number_value/number_value_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .number_value_post_request_body import NumberValuePostRequestBody + +class NumberValueRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the numberValue method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NumberValueRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/numberValue", path_parameters) + + async def post(self,body: NumberValuePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action numberValue + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: NumberValuePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action numberValue + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NumberValueRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NumberValueRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NumberValueRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class NumberValueRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_bin/oct2_bin_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_bin/oct2_bin_post_request_body.py new file mode 100644 index 00000000000..cf0305d640f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_bin/oct2_bin_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Oct2BinPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The places property + places: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Oct2BinPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Oct2BinPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Oct2BinPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "places": lambda n : setattr(self, 'places', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("places", self.places) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_bin/oct2_bin_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_bin/oct2_bin_request_builder.py new file mode 100644 index 00000000000..dcdd5fad7f5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_bin/oct2_bin_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .oct2_bin_post_request_body import Oct2BinPostRequestBody + +class Oct2BinRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the oct2Bin method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Oct2BinRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/oct2Bin", path_parameters) + + async def post(self,body: Oct2BinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action oct2Bin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Oct2BinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action oct2Bin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Oct2BinRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Oct2BinRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Oct2BinRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Oct2BinRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_dec/oct2_dec_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_dec/oct2_dec_post_request_body.py new file mode 100644 index 00000000000..8073227a013 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_dec/oct2_dec_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Oct2DecPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Oct2DecPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Oct2DecPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Oct2DecPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_dec/oct2_dec_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_dec/oct2_dec_request_builder.py new file mode 100644 index 00000000000..a7593e33553 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_dec/oct2_dec_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .oct2_dec_post_request_body import Oct2DecPostRequestBody + +class Oct2DecRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the oct2Dec method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Oct2DecRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/oct2Dec", path_parameters) + + async def post(self,body: Oct2DecPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action oct2Dec + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Oct2DecPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action oct2Dec + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Oct2DecRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Oct2DecRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Oct2DecRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Oct2DecRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_hex/oct2_hex_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_hex/oct2_hex_post_request_body.py new file mode 100644 index 00000000000..a0b2d5af6cc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_hex/oct2_hex_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Oct2HexPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The places property + places: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Oct2HexPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Oct2HexPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Oct2HexPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "places": lambda n : setattr(self, 'places', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("places", self.places) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_hex/oct2_hex_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_hex/oct2_hex_request_builder.py new file mode 100644 index 00000000000..af756970202 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/oct2_hex/oct2_hex_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .oct2_hex_post_request_body import Oct2HexPostRequestBody + +class Oct2HexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the oct2Hex method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Oct2HexRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/oct2Hex", path_parameters) + + async def post(self,body: Oct2HexPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action oct2Hex + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Oct2HexPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action oct2Hex + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Oct2HexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Oct2HexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Oct2HexRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Oct2HexRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd/odd_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd/odd_post_request_body.py new file mode 100644 index 00000000000..c8937f08c54 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd/odd_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class OddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd/odd_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd/odd_request_builder.py new file mode 100644 index 00000000000..b62ac128f0a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd/odd_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .odd_post_request_body import OddPostRequestBody + +class OddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the odd method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new OddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/odd", path_parameters) + + async def post(self,body: OddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action odd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: OddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action odd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> OddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class OddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_price/odd_f_price_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_price/odd_f_price_post_request_body.py new file mode 100644 index 00000000000..6c93054c40f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_price/odd_f_price_post_request_body.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class OddFPricePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The firstCoupon property + first_coupon: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The issue property + issue: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The redemption property + redemption: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + # The yld property + yld: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OddFPricePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OddFPricePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OddFPricePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "firstCoupon": lambda n : setattr(self, 'first_coupon', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "issue": lambda n : setattr(self, 'issue', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "redemption": lambda n : setattr(self, 'redemption', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + "yld": lambda n : setattr(self, 'yld', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("firstCoupon", self.first_coupon) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("issue", self.issue) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("rate", self.rate) + writer.write_object_value("redemption", self.redemption) + writer.write_object_value("settlement", self.settlement) + writer.write_object_value("yld", self.yld) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_price/odd_f_price_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_price/odd_f_price_request_builder.py new file mode 100644 index 00000000000..1f669984823 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_price/odd_f_price_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .odd_f_price_post_request_body import OddFPricePostRequestBody + +class OddFPriceRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the oddFPrice method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new OddFPriceRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/oddFPrice", path_parameters) + + async def post(self,body: OddFPricePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action oddFPrice + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: OddFPricePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action oddFPrice + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> OddFPriceRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OddFPriceRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OddFPriceRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class OddFPriceRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_yield/odd_f_yield_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_yield/odd_f_yield_post_request_body.py new file mode 100644 index 00000000000..a2be257b366 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_yield/odd_f_yield_post_request_body.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class OddFYieldPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The firstCoupon property + first_coupon: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The issue property + issue: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The pr property + pr: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The redemption property + redemption: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OddFYieldPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OddFYieldPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OddFYieldPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "firstCoupon": lambda n : setattr(self, 'first_coupon', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "issue": lambda n : setattr(self, 'issue', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "pr": lambda n : setattr(self, 'pr', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "redemption": lambda n : setattr(self, 'redemption', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("firstCoupon", self.first_coupon) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("issue", self.issue) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("pr", self.pr) + writer.write_object_value("rate", self.rate) + writer.write_object_value("redemption", self.redemption) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_yield/odd_f_yield_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_yield/odd_f_yield_request_builder.py new file mode 100644 index 00000000000..419ee203f0b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_f_yield/odd_f_yield_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .odd_f_yield_post_request_body import OddFYieldPostRequestBody + +class OddFYieldRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the oddFYield method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new OddFYieldRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/oddFYield", path_parameters) + + async def post(self,body: OddFYieldPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action oddFYield + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: OddFYieldPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action oddFYield + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> OddFYieldRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OddFYieldRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OddFYieldRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class OddFYieldRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_price/odd_l_price_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_price/odd_l_price_post_request_body.py new file mode 100644 index 00000000000..c1c74ece1e9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_price/odd_l_price_post_request_body.py @@ -0,0 +1,84 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class OddLPricePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The lastInterest property + last_interest: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The redemption property + redemption: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + # The yld property + yld: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OddLPricePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OddLPricePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OddLPricePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "lastInterest": lambda n : setattr(self, 'last_interest', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "redemption": lambda n : setattr(self, 'redemption', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + "yld": lambda n : setattr(self, 'yld', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("lastInterest", self.last_interest) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("rate", self.rate) + writer.write_object_value("redemption", self.redemption) + writer.write_object_value("settlement", self.settlement) + writer.write_object_value("yld", self.yld) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_price/odd_l_price_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_price/odd_l_price_request_builder.py new file mode 100644 index 00000000000..e7b46a26363 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_price/odd_l_price_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .odd_l_price_post_request_body import OddLPricePostRequestBody + +class OddLPriceRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the oddLPrice method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new OddLPriceRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/oddLPrice", path_parameters) + + async def post(self,body: OddLPricePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action oddLPrice + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: OddLPricePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action oddLPrice + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> OddLPriceRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OddLPriceRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OddLPriceRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class OddLPriceRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_yield/odd_l_yield_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_yield/odd_l_yield_post_request_body.py new file mode 100644 index 00000000000..ebb8bd3a93e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_yield/odd_l_yield_post_request_body.py @@ -0,0 +1,84 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class OddLYieldPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The lastInterest property + last_interest: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The pr property + pr: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The redemption property + redemption: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OddLYieldPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OddLYieldPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OddLYieldPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "lastInterest": lambda n : setattr(self, 'last_interest', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "pr": lambda n : setattr(self, 'pr', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "redemption": lambda n : setattr(self, 'redemption', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("lastInterest", self.last_interest) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("pr", self.pr) + writer.write_object_value("rate", self.rate) + writer.write_object_value("redemption", self.redemption) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_yield/odd_l_yield_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_yield/odd_l_yield_request_builder.py new file mode 100644 index 00000000000..3636e2156dd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/odd_l_yield/odd_l_yield_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .odd_l_yield_post_request_body import OddLYieldPostRequestBody + +class OddLYieldRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the oddLYield method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new OddLYieldRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/oddLYield", path_parameters) + + async def post(self,body: OddLYieldPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action oddLYield + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: OddLYieldPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action oddLYield + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> OddLYieldRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OddLYieldRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OddLYieldRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class OddLYieldRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/or_/or_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/or_/or_post_request_body.py new file mode 100644 index 00000000000..0dc03728fe5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/or_/or_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class OrPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> OrPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: OrPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return OrPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/or_/or_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/or_/or_request_builder.py new file mode 100644 index 00000000000..cee149278d8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/or_/or_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .or_post_request_body import OrPostRequestBody + +class OrRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the or method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new OrRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/or", path_parameters) + + async def post(self,body: OrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action or + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: OrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action or + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> OrRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OrRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OrRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class OrRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pduration/pduration_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pduration/pduration_post_request_body.py new file mode 100644 index 00000000000..8a3739dcbc6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pduration/pduration_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PdurationPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fv property + fv: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PdurationPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PdurationPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PdurationPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "fv": lambda n : setattr(self, 'fv', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fv", self.fv) + writer.write_object_value("pv", self.pv) + writer.write_object_value("rate", self.rate) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pduration/pduration_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pduration/pduration_request_builder.py new file mode 100644 index 00000000000..bbff792bc5e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pduration/pduration_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .pduration_post_request_body import PdurationPostRequestBody + +class PdurationRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the pduration method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PdurationRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/pduration", path_parameters) + + async def post(self,body: PdurationPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action pduration + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PdurationPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action pduration + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PdurationRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PdurationRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PdurationRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PdurationRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_post_request_body.py new file mode 100644 index 00000000000..641b37b1ee7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PercentRank_ExcPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + # The significance property + significance: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PercentRank_ExcPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PercentRank_ExcPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PercentRank_ExcPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + "significance": lambda n : setattr(self, 'significance', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_object_value("significance", self.significance) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_request_builder.py new file mode 100644 index 00000000000..8bc1245aa76 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_exc/percent_rank_exc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .percent_rank_exc_post_request_body import PercentRank_ExcPostRequestBody + +class PercentRank_ExcRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the percentRank_Exc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PercentRank_ExcRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/percentRank_Exc", path_parameters) + + async def post(self,body: PercentRank_ExcPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action percentRank_Exc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PercentRank_ExcPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action percentRank_Exc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PercentRank_ExcRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PercentRank_ExcRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PercentRank_ExcRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PercentRank_ExcRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_post_request_body.py new file mode 100644 index 00000000000..ba393ab312d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PercentRank_IncPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + # The significance property + significance: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PercentRank_IncPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PercentRank_IncPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PercentRank_IncPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + "significance": lambda n : setattr(self, 'significance', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_object_value("significance", self.significance) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_request_builder.py new file mode 100644 index 00000000000..6fac53f9425 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percent_rank_inc/percent_rank_inc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .percent_rank_inc_post_request_body import PercentRank_IncPostRequestBody + +class PercentRank_IncRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the percentRank_Inc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PercentRank_IncRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/percentRank_Inc", path_parameters) + + async def post(self,body: PercentRank_IncPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action percentRank_Inc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PercentRank_IncPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action percentRank_Inc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PercentRank_IncRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PercentRank_IncRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PercentRank_IncRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PercentRank_IncRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_exc/percentile_exc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_exc/percentile_exc_post_request_body.py new file mode 100644 index 00000000000..8d60e16aca5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_exc/percentile_exc_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Percentile_ExcPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + # The k property + k: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Percentile_ExcPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Percentile_ExcPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Percentile_ExcPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + "k": lambda n : setattr(self, 'k', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_object_value("k", self.k) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_exc/percentile_exc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_exc/percentile_exc_request_builder.py new file mode 100644 index 00000000000..9cc4a7ff05d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_exc/percentile_exc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .percentile_exc_post_request_body import Percentile_ExcPostRequestBody + +class Percentile_ExcRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the percentile_Exc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Percentile_ExcRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/percentile_Exc", path_parameters) + + async def post(self,body: Percentile_ExcPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action percentile_Exc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Percentile_ExcPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action percentile_Exc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Percentile_ExcRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Percentile_ExcRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Percentile_ExcRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Percentile_ExcRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_inc/percentile_inc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_inc/percentile_inc_post_request_body.py new file mode 100644 index 00000000000..6bd68731d72 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_inc/percentile_inc_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Percentile_IncPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + # The k property + k: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Percentile_IncPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Percentile_IncPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Percentile_IncPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + "k": lambda n : setattr(self, 'k', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_object_value("k", self.k) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_inc/percentile_inc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_inc/percentile_inc_request_builder.py new file mode 100644 index 00000000000..4201c269670 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/percentile_inc/percentile_inc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .percentile_inc_post_request_body import Percentile_IncPostRequestBody + +class Percentile_IncRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the percentile_Inc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Percentile_IncRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/percentile_Inc", path_parameters) + + async def post(self,body: Percentile_IncPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action percentile_Inc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Percentile_IncPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action percentile_Inc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Percentile_IncRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Percentile_IncRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Percentile_IncRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Percentile_IncRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permut/permut_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permut/permut_post_request_body.py new file mode 100644 index 00000000000..ce309409ebf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permut/permut_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PermutPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The numberChosen property + number_chosen: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PermutPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PermutPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PermutPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "numberChosen": lambda n : setattr(self, 'number_chosen', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("numberChosen", self.number_chosen) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permut/permut_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permut/permut_request_builder.py new file mode 100644 index 00000000000..cfb1e4394ba --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permut/permut_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .permut_post_request_body import PermutPostRequestBody + +class PermutRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the permut method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PermutRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/permut", path_parameters) + + async def post(self,body: PermutPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action permut + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PermutPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action permut + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PermutRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PermutRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PermutRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PermutRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permutationa/permutationa_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permutationa/permutationa_post_request_body.py new file mode 100644 index 00000000000..74ef8a8b1bd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permutationa/permutationa_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PermutationaPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The numberChosen property + number_chosen: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PermutationaPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PermutationaPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PermutationaPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "numberChosen": lambda n : setattr(self, 'number_chosen', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("numberChosen", self.number_chosen) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permutationa/permutationa_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permutationa/permutationa_request_builder.py new file mode 100644 index 00000000000..030d8fbab24 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/permutationa/permutationa_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .permutationa_post_request_body import PermutationaPostRequestBody + +class PermutationaRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the permutationa method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PermutationaRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/permutationa", path_parameters) + + async def post(self,body: PermutationaPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action permutationa + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PermutationaPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action permutationa + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PermutationaRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PermutationaRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PermutationaRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PermutationaRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/phi/phi_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/phi/phi_post_request_body.py new file mode 100644 index 00000000000..42333da820f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/phi/phi_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PhiPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PhiPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PhiPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PhiPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/phi/phi_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/phi/phi_request_builder.py new file mode 100644 index 00000000000..35934a5c6aa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/phi/phi_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .phi_post_request_body import PhiPostRequestBody + +class PhiRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the phi method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PhiRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/phi", path_parameters) + + async def post(self,body: PhiPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action phi + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PhiPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action phi + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PhiRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PhiRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PhiRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PhiRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pi/pi_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pi/pi_request_builder.py new file mode 100644 index 00000000000..02474d34500 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pi/pi_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + +class PiRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the pi method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PiRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/pi", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action pi + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action pi + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> PiRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PiRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PiRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PiRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pmt/pmt_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pmt/pmt_post_request_body.py new file mode 100644 index 00000000000..3c4f63fd18b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pmt/pmt_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PmtPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fv property + fv: Optional[Json] = None + # The nper property + nper: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The type property + type: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PmtPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PmtPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PmtPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "fv": lambda n : setattr(self, 'fv', n.get_object_value(Json)), + "nper": lambda n : setattr(self, 'nper', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "type": lambda n : setattr(self, 'type', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fv", self.fv) + writer.write_object_value("nper", self.nper) + writer.write_object_value("pv", self.pv) + writer.write_object_value("rate", self.rate) + writer.write_object_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pmt/pmt_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pmt/pmt_request_builder.py new file mode 100644 index 00000000000..3912799400e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pmt/pmt_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .pmt_post_request_body import PmtPostRequestBody + +class PmtRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the pmt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PmtRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/pmt", path_parameters) + + async def post(self,body: PmtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action pmt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PmtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action pmt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PmtRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PmtRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PmtRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PmtRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/poisson_dist/poisson_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/poisson_dist/poisson_dist_post_request_body.py new file mode 100644 index 00000000000..6141b74e024 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/poisson_dist/poisson_dist_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Poisson_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The mean property + mean: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Poisson_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Poisson_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Poisson_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "mean": lambda n : setattr(self, 'mean', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("mean", self.mean) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/poisson_dist/poisson_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/poisson_dist/poisson_dist_request_builder.py new file mode 100644 index 00000000000..3ce263fb698 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/poisson_dist/poisson_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .poisson_dist_post_request_body import Poisson_DistPostRequestBody + +class Poisson_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the poisson_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Poisson_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/poisson_Dist", path_parameters) + + async def post(self,body: Poisson_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action poisson_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Poisson_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action poisson_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Poisson_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Poisson_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Poisson_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Poisson_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/power/power_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/power/power_post_request_body.py new file mode 100644 index 00000000000..d380d12edaa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/power/power_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PowerPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The power property + power: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PowerPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PowerPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PowerPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "power": lambda n : setattr(self, 'power', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("power", self.power) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/power/power_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/power/power_request_builder.py new file mode 100644 index 00000000000..13a34471d41 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/power/power_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .power_post_request_body import PowerPostRequestBody + +class PowerRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the power method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PowerRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/power", path_parameters) + + async def post(self,body: PowerPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action power + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PowerPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action power + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PowerRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PowerRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PowerRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PowerRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ppmt/ppmt_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ppmt/ppmt_post_request_body.py new file mode 100644 index 00000000000..9f3feb60b47 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ppmt/ppmt_post_request_body.py @@ -0,0 +1,76 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PpmtPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fv property + fv: Optional[Json] = None + # The nper property + nper: Optional[Json] = None + # The per property + per: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The type property + type: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PpmtPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PpmtPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PpmtPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "fv": lambda n : setattr(self, 'fv', n.get_object_value(Json)), + "nper": lambda n : setattr(self, 'nper', n.get_object_value(Json)), + "per": lambda n : setattr(self, 'per', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "type": lambda n : setattr(self, 'type', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fv", self.fv) + writer.write_object_value("nper", self.nper) + writer.write_object_value("per", self.per) + writer.write_object_value("pv", self.pv) + writer.write_object_value("rate", self.rate) + writer.write_object_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ppmt/ppmt_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ppmt/ppmt_request_builder.py new file mode 100644 index 00000000000..b2715be97f4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/ppmt/ppmt_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .ppmt_post_request_body import PpmtPostRequestBody + +class PpmtRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the ppmt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PpmtRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/ppmt", path_parameters) + + async def post(self,body: PpmtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action ppmt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PpmtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action ppmt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PpmtRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PpmtRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PpmtRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PpmtRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price/price_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price/price_post_request_body.py new file mode 100644 index 00000000000..a180c59e4d4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price/price_post_request_body.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PricePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The redemption property + redemption: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + # The yld property + yld: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PricePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PricePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PricePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "redemption": lambda n : setattr(self, 'redemption', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + "yld": lambda n : setattr(self, 'yld', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("rate", self.rate) + writer.write_object_value("redemption", self.redemption) + writer.write_object_value("settlement", self.settlement) + writer.write_object_value("yld", self.yld) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price/price_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price/price_request_builder.py new file mode 100644 index 00000000000..da14ae28bad --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price/price_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .price_post_request_body import PricePostRequestBody + +class PriceRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the price method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PriceRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/price", path_parameters) + + async def post(self,body: PricePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action price + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PricePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action price + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PriceRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PriceRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PriceRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PriceRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_disc/price_disc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_disc/price_disc_post_request_body.py new file mode 100644 index 00000000000..a0659fe2779 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_disc/price_disc_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PriceDiscPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The discount property + discount: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The redemption property + redemption: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PriceDiscPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PriceDiscPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PriceDiscPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "discount": lambda n : setattr(self, 'discount', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "redemption": lambda n : setattr(self, 'redemption', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("discount", self.discount) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("redemption", self.redemption) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_disc/price_disc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_disc/price_disc_request_builder.py new file mode 100644 index 00000000000..050454e79e0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_disc/price_disc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .price_disc_post_request_body import PriceDiscPostRequestBody + +class PriceDiscRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the priceDisc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PriceDiscRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/priceDisc", path_parameters) + + async def post(self,body: PriceDiscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action priceDisc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PriceDiscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action priceDisc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PriceDiscRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PriceDiscRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PriceDiscRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PriceDiscRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_mat/price_mat_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_mat/price_mat_post_request_body.py new file mode 100644 index 00000000000..f02b8ad6023 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_mat/price_mat_post_request_body.py @@ -0,0 +1,76 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PriceMatPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The issue property + issue: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + # The yld property + yld: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PriceMatPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PriceMatPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PriceMatPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "issue": lambda n : setattr(self, 'issue', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + "yld": lambda n : setattr(self, 'yld', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("issue", self.issue) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("rate", self.rate) + writer.write_object_value("settlement", self.settlement) + writer.write_object_value("yld", self.yld) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_mat/price_mat_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_mat/price_mat_request_builder.py new file mode 100644 index 00000000000..523616f30e3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/price_mat/price_mat_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .price_mat_post_request_body import PriceMatPostRequestBody + +class PriceMatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the priceMat method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PriceMatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/priceMat", path_parameters) + + async def post(self,body: PriceMatPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action priceMat + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PriceMatPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action priceMat + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PriceMatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PriceMatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PriceMatRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PriceMatRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/product/product_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/product/product_post_request_body.py new file mode 100644 index 00000000000..2a20f33d596 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/product/product_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ProductPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ProductPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ProductPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ProductPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/product/product_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/product/product_request_builder.py new file mode 100644 index 00000000000..643ef4422ed --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/product/product_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .product_post_request_body import ProductPostRequestBody + +class ProductRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the product method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ProductRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/product", path_parameters) + + async def post(self,body: ProductPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action product + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ProductPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action product + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ProductRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ProductRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ProductRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ProductRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/proper/proper_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/proper/proper_post_request_body.py new file mode 100644 index 00000000000..f2e472c95eb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/proper/proper_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ProperPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ProperPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ProperPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ProperPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/proper/proper_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/proper/proper_request_builder.py new file mode 100644 index 00000000000..883593318f8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/proper/proper_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .proper_post_request_body import ProperPostRequestBody + +class ProperRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the proper method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ProperRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/proper", path_parameters) + + async def post(self,body: ProperPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action proper + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ProperPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action proper + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ProperRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ProperRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ProperRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ProperRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pv/pv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pv/pv_post_request_body.py new file mode 100644 index 00000000000..d7279062ccf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pv/pv_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class PvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fv property + fv: Optional[Json] = None + # The nper property + nper: Optional[Json] = None + # The pmt property + pmt: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The type property + type: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> PvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: PvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return PvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "fv": lambda n : setattr(self, 'fv', n.get_object_value(Json)), + "nper": lambda n : setattr(self, 'nper', n.get_object_value(Json)), + "pmt": lambda n : setattr(self, 'pmt', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "type": lambda n : setattr(self, 'type', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fv", self.fv) + writer.write_object_value("nper", self.nper) + writer.write_object_value("pmt", self.pmt) + writer.write_object_value("rate", self.rate) + writer.write_object_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pv/pv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pv/pv_request_builder.py new file mode 100644 index 00000000000..e7e032bb029 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/pv/pv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .pv_post_request_body import PvPostRequestBody + +class PvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the pv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/pv", path_parameters) + + async def post(self,body: PvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action pv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: PvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action pv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_exc/quartile_exc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_exc/quartile_exc_post_request_body.py new file mode 100644 index 00000000000..3ffd21d95db --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_exc/quartile_exc_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Quartile_ExcPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + # The quart property + quart: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Quartile_ExcPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Quartile_ExcPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Quartile_ExcPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + "quart": lambda n : setattr(self, 'quart', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_object_value("quart", self.quart) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_exc/quartile_exc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_exc/quartile_exc_request_builder.py new file mode 100644 index 00000000000..252e9770c0f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_exc/quartile_exc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .quartile_exc_post_request_body import Quartile_ExcPostRequestBody + +class Quartile_ExcRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the quartile_Exc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Quartile_ExcRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/quartile_Exc", path_parameters) + + async def post(self,body: Quartile_ExcPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action quartile_Exc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Quartile_ExcPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action quartile_Exc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Quartile_ExcRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Quartile_ExcRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Quartile_ExcRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Quartile_ExcRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_inc/quartile_inc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_inc/quartile_inc_post_request_body.py new file mode 100644 index 00000000000..4b022a75d92 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_inc/quartile_inc_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Quartile_IncPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + # The quart property + quart: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Quartile_IncPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Quartile_IncPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Quartile_IncPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + "quart": lambda n : setattr(self, 'quart', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_object_value("quart", self.quart) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_inc/quartile_inc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_inc/quartile_inc_request_builder.py new file mode 100644 index 00000000000..b4dd1e3b225 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quartile_inc/quartile_inc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .quartile_inc_post_request_body import Quartile_IncPostRequestBody + +class Quartile_IncRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the quartile_Inc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Quartile_IncRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/quartile_Inc", path_parameters) + + async def post(self,body: Quartile_IncPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action quartile_Inc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Quartile_IncPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action quartile_Inc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Quartile_IncRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Quartile_IncRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Quartile_IncRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Quartile_IncRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quotient/quotient_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quotient/quotient_post_request_body.py new file mode 100644 index 00000000000..69a0f7d351e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quotient/quotient_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class QuotientPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The denominator property + denominator: Optional[Json] = None + # The numerator property + numerator: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> QuotientPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: QuotientPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return QuotientPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "denominator": lambda n : setattr(self, 'denominator', n.get_object_value(Json)), + "numerator": lambda n : setattr(self, 'numerator', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("denominator", self.denominator) + writer.write_object_value("numerator", self.numerator) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quotient/quotient_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quotient/quotient_request_builder.py new file mode 100644 index 00000000000..f146a1d74f4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/quotient/quotient_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .quotient_post_request_body import QuotientPostRequestBody + +class QuotientRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the quotient method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new QuotientRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/quotient", path_parameters) + + async def post(self,body: QuotientPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action quotient + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: QuotientPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action quotient + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> QuotientRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: QuotientRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return QuotientRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class QuotientRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/radians/radians_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/radians/radians_post_request_body.py new file mode 100644 index 00000000000..77b9d55d1f7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/radians/radians_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RadiansPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The angle property + angle: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RadiansPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RadiansPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RadiansPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "angle": lambda n : setattr(self, 'angle', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("angle", self.angle) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/radians/radians_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/radians/radians_request_builder.py new file mode 100644 index 00000000000..7ab9aae3fb2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/radians/radians_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .radians_post_request_body import RadiansPostRequestBody + +class RadiansRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the radians method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RadiansRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/radians", path_parameters) + + async def post(self,body: RadiansPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action radians + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RadiansPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action radians + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RadiansRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RadiansRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RadiansRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RadiansRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand/rand_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand/rand_request_builder.py new file mode 100644 index 00000000000..3807c49d5c3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand/rand_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + +class RandRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the rand method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RandRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/rand", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action rand + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action rand + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RandRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RandRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RandRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RandRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand_between/rand_between_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand_between/rand_between_post_request_body.py new file mode 100644 index 00000000000..28b6c17f5ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand_between/rand_between_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RandBetweenPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The bottom property + bottom: Optional[Json] = None + # The top property + top: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RandBetweenPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RandBetweenPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RandBetweenPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "bottom": lambda n : setattr(self, 'bottom', n.get_object_value(Json)), + "top": lambda n : setattr(self, 'top', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("bottom", self.bottom) + writer.write_object_value("top", self.top) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand_between/rand_between_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand_between/rand_between_request_builder.py new file mode 100644 index 00000000000..a5b86a8e428 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rand_between/rand_between_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .rand_between_post_request_body import RandBetweenPostRequestBody + +class RandBetweenRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the randBetween method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RandBetweenRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/randBetween", path_parameters) + + async def post(self,body: RandBetweenPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action randBetween + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RandBetweenPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action randBetween + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RandBetweenRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RandBetweenRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RandBetweenRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RandBetweenRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_avg/rank_avg_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_avg/rank_avg_post_request_body.py new file mode 100644 index 00000000000..2f5994ee176 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_avg/rank_avg_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Rank_AvgPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The order property + order: Optional[Json] = None + # The ref property + ref: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Rank_AvgPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Rank_AvgPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Rank_AvgPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "order": lambda n : setattr(self, 'order', n.get_object_value(Json)), + "ref": lambda n : setattr(self, 'ref', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("order", self.order) + writer.write_object_value("ref", self.ref) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_avg/rank_avg_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_avg/rank_avg_request_builder.py new file mode 100644 index 00000000000..e2a6a33afce --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_avg/rank_avg_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .rank_avg_post_request_body import Rank_AvgPostRequestBody + +class Rank_AvgRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the rank_Avg method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Rank_AvgRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/rank_Avg", path_parameters) + + async def post(self,body: Rank_AvgPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action rank_Avg + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Rank_AvgPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action rank_Avg + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Rank_AvgRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Rank_AvgRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Rank_AvgRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Rank_AvgRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_eq/rank_eq_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_eq/rank_eq_post_request_body.py new file mode 100644 index 00000000000..dfb36443155 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_eq/rank_eq_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Rank_EqPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + # The order property + order: Optional[Json] = None + # The ref property + ref: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Rank_EqPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Rank_EqPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Rank_EqPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + "order": lambda n : setattr(self, 'order', n.get_object_value(Json)), + "ref": lambda n : setattr(self, 'ref', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_object_value("order", self.order) + writer.write_object_value("ref", self.ref) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_eq/rank_eq_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_eq/rank_eq_request_builder.py new file mode 100644 index 00000000000..a2ec889066c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rank_eq/rank_eq_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .rank_eq_post_request_body import Rank_EqPostRequestBody + +class Rank_EqRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the rank_Eq method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Rank_EqRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/rank_Eq", path_parameters) + + async def post(self,body: Rank_EqPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action rank_Eq + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Rank_EqPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action rank_Eq + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Rank_EqRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Rank_EqRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Rank_EqRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Rank_EqRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rate/rate_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rate/rate_post_request_body.py new file mode 100644 index 00000000000..bf3bce5701b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rate/rate_post_request_body.py @@ -0,0 +1,76 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RatePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fv property + fv: Optional[Json] = None + # The guess property + guess: Optional[Json] = None + # The nper property + nper: Optional[Json] = None + # The pmt property + pmt: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + # The type property + type: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RatePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RatePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RatePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "fv": lambda n : setattr(self, 'fv', n.get_object_value(Json)), + "guess": lambda n : setattr(self, 'guess', n.get_object_value(Json)), + "nper": lambda n : setattr(self, 'nper', n.get_object_value(Json)), + "pmt": lambda n : setattr(self, 'pmt', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + "type": lambda n : setattr(self, 'type', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fv", self.fv) + writer.write_object_value("guess", self.guess) + writer.write_object_value("nper", self.nper) + writer.write_object_value("pmt", self.pmt) + writer.write_object_value("pv", self.pv) + writer.write_object_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rate/rate_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rate/rate_request_builder.py new file mode 100644 index 00000000000..ee9f00d5802 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rate/rate_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .rate_post_request_body import RatePostRequestBody + +class RateRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the rate method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RateRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/rate", path_parameters) + + async def post(self,body: RatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action rate + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RatePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action rate + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RateRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RateRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RateRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RateRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/received/received_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/received/received_post_request_body.py new file mode 100644 index 00000000000..045ccea7545 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/received/received_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ReceivedPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The discount property + discount: Optional[Json] = None + # The investment property + investment: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ReceivedPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ReceivedPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ReceivedPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "discount": lambda n : setattr(self, 'discount', n.get_object_value(Json)), + "investment": lambda n : setattr(self, 'investment', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("discount", self.discount) + writer.write_object_value("investment", self.investment) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/received/received_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/received/received_request_builder.py new file mode 100644 index 00000000000..0b046fe334d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/received/received_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .received_post_request_body import ReceivedPostRequestBody + +class ReceivedRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the received method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReceivedRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/received", path_parameters) + + async def post(self,body: ReceivedPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action received + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ReceivedPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action received + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ReceivedRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReceivedRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReceivedRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReceivedRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace/replace_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace/replace_post_request_body.py new file mode 100644 index 00000000000..79258788f70 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace/replace_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ReplacePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The newText property + new_text: Optional[Json] = None + # The numChars property + num_chars: Optional[Json] = None + # The oldText property + old_text: Optional[Json] = None + # The startNum property + start_num: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ReplacePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ReplacePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ReplacePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "newText": lambda n : setattr(self, 'new_text', n.get_object_value(Json)), + "numChars": lambda n : setattr(self, 'num_chars', n.get_object_value(Json)), + "oldText": lambda n : setattr(self, 'old_text', n.get_object_value(Json)), + "startNum": lambda n : setattr(self, 'start_num', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("newText", self.new_text) + writer.write_object_value("numChars", self.num_chars) + writer.write_object_value("oldText", self.old_text) + writer.write_object_value("startNum", self.start_num) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace/replace_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace/replace_request_builder.py new file mode 100644 index 00000000000..5ff3633f748 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace/replace_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .replace_post_request_body import ReplacePostRequestBody + +class ReplaceRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the replace method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReplaceRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/replace", path_parameters) + + async def post(self,body: ReplacePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action replace + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ReplacePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action replace + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ReplaceRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReplaceRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReplaceRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReplaceRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace_b/replace_b_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace_b/replace_b_post_request_body.py new file mode 100644 index 00000000000..a52476f0ce1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace_b/replace_b_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ReplaceBPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The newText property + new_text: Optional[Json] = None + # The numBytes property + num_bytes: Optional[Json] = None + # The oldText property + old_text: Optional[Json] = None + # The startNum property + start_num: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ReplaceBPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ReplaceBPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ReplaceBPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "newText": lambda n : setattr(self, 'new_text', n.get_object_value(Json)), + "numBytes": lambda n : setattr(self, 'num_bytes', n.get_object_value(Json)), + "oldText": lambda n : setattr(self, 'old_text', n.get_object_value(Json)), + "startNum": lambda n : setattr(self, 'start_num', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("newText", self.new_text) + writer.write_object_value("numBytes", self.num_bytes) + writer.write_object_value("oldText", self.old_text) + writer.write_object_value("startNum", self.start_num) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace_b/replace_b_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace_b/replace_b_request_builder.py new file mode 100644 index 00000000000..bc1587c7146 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/replace_b/replace_b_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .replace_b_post_request_body import ReplaceBPostRequestBody + +class ReplaceBRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the replaceB method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReplaceBRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/replaceB", path_parameters) + + async def post(self,body: ReplaceBPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action replaceB + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ReplaceBPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action replaceB + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ReplaceBRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReplaceBRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReplaceBRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReplaceBRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rept/rept_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rept/rept_post_request_body.py new file mode 100644 index 00000000000..97947749e05 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rept/rept_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ReptPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numberTimes property + number_times: Optional[Json] = None + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ReptPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ReptPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ReptPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numberTimes": lambda n : setattr(self, 'number_times', n.get_object_value(Json)), + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numberTimes", self.number_times) + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rept/rept_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rept/rept_request_builder.py new file mode 100644 index 00000000000..d99f908de9e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rept/rept_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .rept_post_request_body import ReptPostRequestBody + +class ReptRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the rept method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReptRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/rept", path_parameters) + + async def post(self,body: ReptPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action rept + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ReptPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action rept + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ReptRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReptRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReptRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReptRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/right/right_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/right/right_post_request_body.py new file mode 100644 index 00000000000..b14fb17ced4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/right/right_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RightPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numChars property + num_chars: Optional[Json] = None + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RightPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RightPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RightPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numChars": lambda n : setattr(self, 'num_chars', n.get_object_value(Json)), + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numChars", self.num_chars) + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/right/right_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/right/right_request_builder.py new file mode 100644 index 00000000000..41ba1ce2177 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/right/right_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .right_post_request_body import RightPostRequestBody + +class RightRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the right method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RightRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/right", path_parameters) + + async def post(self,body: RightPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action right + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RightPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action right + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RightRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RightRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RightRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RightRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rightb/rightb_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rightb/rightb_post_request_body.py new file mode 100644 index 00000000000..fd8e0bfbd01 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rightb/rightb_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RightbPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numBytes property + num_bytes: Optional[Json] = None + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RightbPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RightbPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RightbPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numBytes": lambda n : setattr(self, 'num_bytes', n.get_object_value(Json)), + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numBytes", self.num_bytes) + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rightb/rightb_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rightb/rightb_request_builder.py new file mode 100644 index 00000000000..fdf5036d8d9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rightb/rightb_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .rightb_post_request_body import RightbPostRequestBody + +class RightbRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the rightb method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RightbRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/rightb", path_parameters) + + async def post(self,body: RightbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action rightb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RightbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action rightb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RightbRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RightbRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RightbRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RightbRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/roman/roman_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/roman/roman_post_request_body.py new file mode 100644 index 00000000000..bd331a42c3a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/roman/roman_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RomanPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The form property + form: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RomanPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RomanPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RomanPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "form": lambda n : setattr(self, 'form', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("form", self.form) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/roman/roman_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/roman/roman_request_builder.py new file mode 100644 index 00000000000..6e9e2185d3a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/roman/roman_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .roman_post_request_body import RomanPostRequestBody + +class RomanRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the roman method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RomanRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/roman", path_parameters) + + async def post(self,body: RomanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action roman + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RomanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action roman + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RomanRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RomanRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RomanRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RomanRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round/round_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round/round_post_request_body.py new file mode 100644 index 00000000000..cf7bba23d4c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round/round_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RoundPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numDigits property + num_digits: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RoundPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RoundPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RoundPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numDigits": lambda n : setattr(self, 'num_digits', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numDigits", self.num_digits) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round/round_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round/round_request_builder.py new file mode 100644 index 00000000000..a6c4071a9ff --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round/round_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .round_post_request_body import RoundPostRequestBody + +class RoundRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the round method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RoundRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/round", path_parameters) + + async def post(self,body: RoundPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action round + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RoundPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action round + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RoundRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RoundRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RoundRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RoundRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_down/round_down_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_down/round_down_post_request_body.py new file mode 100644 index 00000000000..3bd3e0e0e64 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_down/round_down_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RoundDownPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numDigits property + num_digits: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RoundDownPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RoundDownPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RoundDownPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numDigits": lambda n : setattr(self, 'num_digits', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numDigits", self.num_digits) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_down/round_down_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_down/round_down_request_builder.py new file mode 100644 index 00000000000..ea62544a907 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_down/round_down_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .round_down_post_request_body import RoundDownPostRequestBody + +class RoundDownRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the roundDown method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RoundDownRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/roundDown", path_parameters) + + async def post(self,body: RoundDownPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action roundDown + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RoundDownPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action roundDown + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RoundDownRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RoundDownRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RoundDownRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RoundDownRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_up/round_up_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_up/round_up_post_request_body.py new file mode 100644 index 00000000000..070c5dc948d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_up/round_up_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RoundUpPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numDigits property + num_digits: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RoundUpPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RoundUpPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RoundUpPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numDigits": lambda n : setattr(self, 'num_digits', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numDigits", self.num_digits) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_up/round_up_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_up/round_up_request_builder.py new file mode 100644 index 00000000000..1a5127ed9e6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/round_up/round_up_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .round_up_post_request_body import RoundUpPostRequestBody + +class RoundUpRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the roundUp method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RoundUpRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/roundUp", path_parameters) + + async def post(self,body: RoundUpPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action roundUp + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RoundUpPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action roundUp + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RoundUpRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RoundUpRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RoundUpRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RoundUpRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rows/rows_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rows/rows_post_request_body.py new file mode 100644 index 00000000000..aebc7f104d4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rows/rows_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RowsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RowsPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RowsPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RowsPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rows/rows_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rows/rows_request_builder.py new file mode 100644 index 00000000000..0ea70595392 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rows/rows_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .rows_post_request_body import RowsPostRequestBody + +class RowsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the rows method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RowsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/rows", path_parameters) + + async def post(self,body: RowsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action rows + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RowsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action rows + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RowsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RowsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RowsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RowsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rri/rri_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rri/rri_post_request_body.py new file mode 100644 index 00000000000..4de0f383f6a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rri/rri_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class RriPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fv property + fv: Optional[Json] = None + # The nper property + nper: Optional[Json] = None + # The pv property + pv: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RriPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RriPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RriPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "fv": lambda n : setattr(self, 'fv', n.get_object_value(Json)), + "nper": lambda n : setattr(self, 'nper', n.get_object_value(Json)), + "pv": lambda n : setattr(self, 'pv', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("fv", self.fv) + writer.write_object_value("nper", self.nper) + writer.write_object_value("pv", self.pv) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rri/rri_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rri/rri_request_builder.py new file mode 100644 index 00000000000..71ee1e8dc27 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/rri/rri_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .rri_post_request_body import RriPostRequestBody + +class RriRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the rri method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RriRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/rri", path_parameters) + + async def post(self,body: RriPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action rri + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: RriPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action rri + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RriRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RriRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RriRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RriRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sec/sec_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sec/sec_post_request_body.py new file mode 100644 index 00000000000..c8b22efd4c0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sec/sec_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SecPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SecPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SecPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SecPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sec/sec_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sec/sec_request_builder.py new file mode 100644 index 00000000000..ace8666fb66 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sec/sec_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sec_post_request_body import SecPostRequestBody + +class SecRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sec method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SecRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sec", path_parameters) + + async def post(self,body: SecPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sec + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SecPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sec + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SecRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SecRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SecRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SecRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sech/sech_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sech/sech_post_request_body.py new file mode 100644 index 00000000000..9c2d07a3fff --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sech/sech_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SechPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SechPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SechPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SechPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sech/sech_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sech/sech_request_builder.py new file mode 100644 index 00000000000..f578a872d7d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sech/sech_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sech_post_request_body import SechPostRequestBody + +class SechRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sech method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SechRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sech", path_parameters) + + async def post(self,body: SechPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sech + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SechPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sech + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SechRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SechRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SechRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SechRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/second/second_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/second/second_post_request_body.py new file mode 100644 index 00000000000..3b62dbdf22c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/second/second_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SecondPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The serialNumber property + serial_number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SecondPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SecondPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SecondPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "serialNumber": lambda n : setattr(self, 'serial_number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("serialNumber", self.serial_number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/second/second_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/second/second_request_builder.py new file mode 100644 index 00000000000..4562389810e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/second/second_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .second_post_request_body import SecondPostRequestBody + +class SecondRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the second method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SecondRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/second", path_parameters) + + async def post(self,body: SecondPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action second + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SecondPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action second + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SecondRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SecondRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SecondRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SecondRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/series_sum/series_sum_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/series_sum/series_sum_post_request_body.py new file mode 100644 index 00000000000..d859460af79 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/series_sum/series_sum_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SeriesSumPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The coefficients property + coefficients: Optional[Json] = None + # The m property + m: Optional[Json] = None + # The n property + n: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SeriesSumPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SeriesSumPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SeriesSumPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "coefficients": lambda n : setattr(self, 'coefficients', n.get_object_value(Json)), + "m": lambda n : setattr(self, 'm', n.get_object_value(Json)), + "n": lambda n : setattr(self, 'n', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("coefficients", self.coefficients) + writer.write_object_value("m", self.m) + writer.write_object_value("n", self.n) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/series_sum/series_sum_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/series_sum/series_sum_request_builder.py new file mode 100644 index 00000000000..5614bc16050 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/series_sum/series_sum_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .series_sum_post_request_body import SeriesSumPostRequestBody + +class SeriesSumRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the seriesSum method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SeriesSumRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/seriesSum", path_parameters) + + async def post(self,body: SeriesSumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action seriesSum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SeriesSumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action seriesSum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SeriesSumRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SeriesSumRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SeriesSumRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SeriesSumRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheet/sheet_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheet/sheet_post_request_body.py new file mode 100644 index 00000000000..da64fa25720 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheet/sheet_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SheetPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SheetPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SheetPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SheetPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheet/sheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheet/sheet_request_builder.py new file mode 100644 index 00000000000..73f50111681 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheet/sheet_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sheet_post_request_body import SheetPostRequestBody + +class SheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sheet method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sheet", path_parameters) + + async def post(self,body: SheetPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sheet + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SheetPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sheet + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SheetRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheets/sheets_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheets/sheets_post_request_body.py new file mode 100644 index 00000000000..3aa84504fc0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheets/sheets_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SheetsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The reference property + reference: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SheetsPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SheetsPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SheetsPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "reference": lambda n : setattr(self, 'reference', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("reference", self.reference) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheets/sheets_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheets/sheets_request_builder.py new file mode 100644 index 00000000000..a7c2938221d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sheets/sheets_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sheets_post_request_body import SheetsPostRequestBody + +class SheetsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sheets method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SheetsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sheets", path_parameters) + + async def post(self,body: SheetsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sheets + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SheetsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sheets + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SheetsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SheetsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SheetsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SheetsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sign/sign_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sign/sign_post_request_body.py new file mode 100644 index 00000000000..4a75b1aa0cb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sign/sign_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SignPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SignPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SignPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SignPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sign/sign_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sign/sign_request_builder.py new file mode 100644 index 00000000000..c518a3afb41 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sign/sign_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sign_post_request_body import SignPostRequestBody + +class SignRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sign method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SignRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sign", path_parameters) + + async def post(self,body: SignPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sign + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SignPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sign + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SignRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SignRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SignRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SignRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sin/sin_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sin/sin_post_request_body.py new file mode 100644 index 00000000000..884cca644f9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sin/sin_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SinPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SinPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SinPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SinPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sin/sin_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sin/sin_request_builder.py new file mode 100644 index 00000000000..ddfef8a42cd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sin/sin_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sin_post_request_body import SinPostRequestBody + +class SinRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sin method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SinRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sin", path_parameters) + + async def post(self,body: SinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SinPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sin + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SinRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SinRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SinRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SinRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sinh/sinh_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sinh/sinh_post_request_body.py new file mode 100644 index 00000000000..5995a6ff3ad --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sinh/sinh_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SinhPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SinhPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SinhPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SinhPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sinh/sinh_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sinh/sinh_request_builder.py new file mode 100644 index 00000000000..5e4cce33990 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sinh/sinh_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sinh_post_request_body import SinhPostRequestBody + +class SinhRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sinh method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SinhRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sinh", path_parameters) + + async def post(self,body: SinhPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sinh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SinhPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sinh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SinhRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SinhRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SinhRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SinhRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew/skew_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew/skew_post_request_body.py new file mode 100644 index 00000000000..c16dca05ba1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew/skew_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SkewPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SkewPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SkewPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SkewPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew/skew_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew/skew_request_builder.py new file mode 100644 index 00000000000..0c5024c5e84 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew/skew_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .skew_post_request_body import SkewPostRequestBody + +class SkewRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the skew method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SkewRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/skew", path_parameters) + + async def post(self,body: SkewPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action skew + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SkewPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action skew + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SkewRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SkewRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SkewRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SkewRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew_p/skew_p_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew_p/skew_p_post_request_body.py new file mode 100644 index 00000000000..7e0ef306247 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew_p/skew_p_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Skew_pPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Skew_pPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Skew_pPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Skew_pPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew_p/skew_p_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew_p/skew_p_request_builder.py new file mode 100644 index 00000000000..207c63217d7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/skew_p/skew_p_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .skew_p_post_request_body import Skew_pPostRequestBody + +class Skew_pRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the skew_p method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Skew_pRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/skew_p", path_parameters) + + async def post(self,body: Skew_pPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action skew_p + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Skew_pPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action skew_p + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Skew_pRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Skew_pRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Skew_pRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Skew_pRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sln/sln_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sln/sln_post_request_body.py new file mode 100644 index 00000000000..2cc90026c4e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sln/sln_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SlnPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cost property + cost: Optional[Json] = None + # The life property + life: Optional[Json] = None + # The salvage property + salvage: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SlnPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SlnPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SlnPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cost": lambda n : setattr(self, 'cost', n.get_object_value(Json)), + "life": lambda n : setattr(self, 'life', n.get_object_value(Json)), + "salvage": lambda n : setattr(self, 'salvage', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cost", self.cost) + writer.write_object_value("life", self.life) + writer.write_object_value("salvage", self.salvage) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sln/sln_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sln/sln_request_builder.py new file mode 100644 index 00000000000..9cb300870c1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sln/sln_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sln_post_request_body import SlnPostRequestBody + +class SlnRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sln method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SlnRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sln", path_parameters) + + async def post(self,body: SlnPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sln + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SlnPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sln + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SlnRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SlnRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SlnRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SlnRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/small/small_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/small/small_post_request_body.py new file mode 100644 index 00000000000..01d3e5fe745 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/small/small_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SmallPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + # The k property + k: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SmallPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SmallPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SmallPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + "k": lambda n : setattr(self, 'k', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_object_value("k", self.k) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/small/small_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/small/small_request_builder.py new file mode 100644 index 00000000000..f224d819abf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/small/small_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .small_post_request_body import SmallPostRequestBody + +class SmallRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the small method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SmallRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/small", path_parameters) + + async def post(self,body: SmallPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action small + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SmallPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action small + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SmallRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SmallRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SmallRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SmallRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt/sqrt_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt/sqrt_post_request_body.py new file mode 100644 index 00000000000..0d9fb668d94 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt/sqrt_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SqrtPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SqrtPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SqrtPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SqrtPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt/sqrt_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt/sqrt_request_builder.py new file mode 100644 index 00000000000..91972ad9ec5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt/sqrt_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sqrt_post_request_body import SqrtPostRequestBody + +class SqrtRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sqrt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SqrtRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sqrt", path_parameters) + + async def post(self,body: SqrtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sqrt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SqrtPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sqrt + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SqrtRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SqrtRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SqrtRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SqrtRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt_pi/sqrt_pi_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt_pi/sqrt_pi_post_request_body.py new file mode 100644 index 00000000000..434922238f9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt_pi/sqrt_pi_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SqrtPiPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SqrtPiPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SqrtPiPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SqrtPiPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt_pi/sqrt_pi_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt_pi/sqrt_pi_request_builder.py new file mode 100644 index 00000000000..b0be75b4a4f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sqrt_pi/sqrt_pi_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sqrt_pi_post_request_body import SqrtPiPostRequestBody + +class SqrtPiRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sqrtPi method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SqrtPiRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sqrtPi", path_parameters) + + async def post(self,body: SqrtPiPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sqrtPi + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SqrtPiPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sqrtPi + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SqrtPiRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SqrtPiRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SqrtPiRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SqrtPiRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_a/st_dev_a_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_a/st_dev_a_post_request_body.py new file mode 100644 index 00000000000..10e97158b55 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_a/st_dev_a_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class StDevAPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> StDevAPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: StDevAPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return StDevAPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_a/st_dev_a_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_a/st_dev_a_request_builder.py new file mode 100644 index 00000000000..a5a7585c367 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_a/st_dev_a_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .st_dev_a_post_request_body import StDevAPostRequestBody + +class StDevARequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the stDevA method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new StDevARequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/stDevA", path_parameters) + + async def post(self,body: StDevAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action stDevA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: StDevAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action stDevA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> StDevARequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: StDevARequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return StDevARequestBuilder(self.request_adapter, raw_url) + + @dataclass + class StDevARequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p/st_dev_p_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p/st_dev_p_post_request_body.py new file mode 100644 index 00000000000..d7202df2826 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p/st_dev_p_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class StDev_PPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> StDev_PPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: StDev_PPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return StDev_PPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p/st_dev_p_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p/st_dev_p_request_builder.py new file mode 100644 index 00000000000..ca2a49e99b4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p/st_dev_p_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .st_dev_p_post_request_body import StDev_PPostRequestBody + +class StDev_PRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the stDev_P method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new StDev_PRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/stDev_P", path_parameters) + + async def post(self,body: StDev_PPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action stDev_P + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: StDev_PPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action stDev_P + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> StDev_PRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: StDev_PRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return StDev_PRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class StDev_PRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_post_request_body.py new file mode 100644 index 00000000000..717da4eb3c2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class StDevPAPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> StDevPAPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: StDevPAPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return StDevPAPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_request_builder.py new file mode 100644 index 00000000000..e60f873b04f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_p_a/st_dev_p_a_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .st_dev_p_a_post_request_body import StDevPAPostRequestBody + +class StDevPARequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the stDevPA method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new StDevPARequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/stDevPA", path_parameters) + + async def post(self,body: StDevPAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action stDevPA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: StDevPAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action stDevPA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> StDevPARequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: StDevPARequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return StDevPARequestBuilder(self.request_adapter, raw_url) + + @dataclass + class StDevPARequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_s/st_dev_s_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_s/st_dev_s_post_request_body.py new file mode 100644 index 00000000000..f35ad284b89 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_s/st_dev_s_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class StDev_SPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> StDev_SPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: StDev_SPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return StDev_SPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_s/st_dev_s_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_s/st_dev_s_request_builder.py new file mode 100644 index 00000000000..1ccf273eebd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/st_dev_s/st_dev_s_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .st_dev_s_post_request_body import StDev_SPostRequestBody + +class StDev_SRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the stDev_S method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new StDev_SRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/stDev_S", path_parameters) + + async def post(self,body: StDev_SPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action stDev_S + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: StDev_SPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action stDev_S + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> StDev_SRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: StDev_SRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return StDev_SRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class StDev_SRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/standardize/standardize_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/standardize/standardize_post_request_body.py new file mode 100644 index 00000000000..155387c23b7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/standardize/standardize_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class StandardizePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The mean property + mean: Optional[Json] = None + # The standardDev property + standard_dev: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> StandardizePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: StandardizePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return StandardizePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "mean": lambda n : setattr(self, 'mean', n.get_object_value(Json)), + "standardDev": lambda n : setattr(self, 'standard_dev', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("mean", self.mean) + writer.write_object_value("standardDev", self.standard_dev) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/standardize/standardize_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/standardize/standardize_request_builder.py new file mode 100644 index 00000000000..f6bf4e69383 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/standardize/standardize_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .standardize_post_request_body import StandardizePostRequestBody + +class StandardizeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the standardize method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new StandardizeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/standardize", path_parameters) + + async def post(self,body: StandardizePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action standardize + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: StandardizePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action standardize + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> StandardizeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: StandardizeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return StandardizeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class StandardizeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/substitute/substitute_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/substitute/substitute_post_request_body.py new file mode 100644 index 00000000000..47b0523c866 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/substitute/substitute_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SubstitutePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The instanceNum property + instance_num: Optional[Json] = None + # The newText property + new_text: Optional[Json] = None + # The oldText property + old_text: Optional[Json] = None + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SubstitutePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SubstitutePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SubstitutePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "instanceNum": lambda n : setattr(self, 'instance_num', n.get_object_value(Json)), + "newText": lambda n : setattr(self, 'new_text', n.get_object_value(Json)), + "oldText": lambda n : setattr(self, 'old_text', n.get_object_value(Json)), + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("instanceNum", self.instance_num) + writer.write_object_value("newText", self.new_text) + writer.write_object_value("oldText", self.old_text) + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/substitute/substitute_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/substitute/substitute_request_builder.py new file mode 100644 index 00000000000..5123ee3348e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/substitute/substitute_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .substitute_post_request_body import SubstitutePostRequestBody + +class SubstituteRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the substitute method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SubstituteRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/substitute", path_parameters) + + async def post(self,body: SubstitutePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action substitute + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SubstitutePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action substitute + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SubstituteRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SubstituteRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SubstituteRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SubstituteRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/subtotal/subtotal_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/subtotal/subtotal_post_request_body.py new file mode 100644 index 00000000000..9377cb6c3f7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/subtotal/subtotal_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SubtotalPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The functionNum property + function_num: Optional[Json] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SubtotalPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SubtotalPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SubtotalPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "functionNum": lambda n : setattr(self, 'function_num', n.get_object_value(Json)), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("functionNum", self.function_num) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/subtotal/subtotal_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/subtotal/subtotal_request_builder.py new file mode 100644 index 00000000000..36adac41fd4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/subtotal/subtotal_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .subtotal_post_request_body import SubtotalPostRequestBody + +class SubtotalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the subtotal method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SubtotalRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/subtotal", path_parameters) + + async def post(self,body: SubtotalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action subtotal + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SubtotalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action subtotal + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SubtotalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SubtotalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SubtotalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SubtotalRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum/sum_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum/sum_post_request_body.py new file mode 100644 index 00000000000..12a83805d50 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum/sum_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SumPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SumPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SumPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SumPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum/sum_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum/sum_request_builder.py new file mode 100644 index 00000000000..40c0648c0cf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum/sum_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sum_post_request_body import SumPostRequestBody + +class SumRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sum method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SumRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sum", path_parameters) + + async def post(self,body: SumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SumRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SumRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SumRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SumRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_if/sum_if_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_if/sum_if_post_request_body.py new file mode 100644 index 00000000000..95f79581905 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_if/sum_if_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SumIfPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[Json] = None + # The range property + range: Optional[Json] = None + # The sumRange property + sum_range: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SumIfPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SumIfPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SumIfPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(Json)), + "range": lambda n : setattr(self, 'range', n.get_object_value(Json)), + "sumRange": lambda n : setattr(self, 'sum_range', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_object_value("range", self.range) + writer.write_object_value("sumRange", self.sum_range) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_if/sum_if_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_if/sum_if_request_builder.py new file mode 100644 index 00000000000..44af6f83380 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_if/sum_if_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sum_if_post_request_body import SumIfPostRequestBody + +class SumIfRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sumIf method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SumIfRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sumIf", path_parameters) + + async def post(self,body: SumIfPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sumIf + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SumIfPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sumIf + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SumIfRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SumIfRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SumIfRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SumIfRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_ifs/sum_ifs_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_ifs/sum_ifs_post_request_body.py new file mode 100644 index 00000000000..765af314576 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_ifs/sum_ifs_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SumIfsPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The sumRange property + sum_range: Optional[Json] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SumIfsPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SumIfsPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SumIfsPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "sumRange": lambda n : setattr(self, 'sum_range', n.get_object_value(Json)), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("sumRange", self.sum_range) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_ifs/sum_ifs_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_ifs/sum_ifs_request_builder.py new file mode 100644 index 00000000000..4d04592b2e0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_ifs/sum_ifs_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sum_ifs_post_request_body import SumIfsPostRequestBody + +class SumIfsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sumIfs method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SumIfsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sumIfs", path_parameters) + + async def post(self,body: SumIfsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sumIfs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SumIfsPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sumIfs + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SumIfsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SumIfsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SumIfsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SumIfsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_sq/sum_sq_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_sq/sum_sq_post_request_body.py new file mode 100644 index 00000000000..3ccd77c59eb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_sq/sum_sq_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SumSqPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SumSqPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SumSqPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SumSqPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_sq/sum_sq_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_sq/sum_sq_request_builder.py new file mode 100644 index 00000000000..56f91971bb4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/sum_sq/sum_sq_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .sum_sq_post_request_body import SumSqPostRequestBody + +class SumSqRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sumSq method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SumSqRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/sumSq", path_parameters) + + async def post(self,body: SumSqPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action sumSq + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SumSqPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action sumSq + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SumSqRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SumSqRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SumSqRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SumSqRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/syd/syd_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/syd/syd_post_request_body.py new file mode 100644 index 00000000000..9cfda608f75 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/syd/syd_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class SydPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cost property + cost: Optional[Json] = None + # The life property + life: Optional[Json] = None + # The per property + per: Optional[Json] = None + # The salvage property + salvage: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SydPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SydPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SydPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cost": lambda n : setattr(self, 'cost', n.get_object_value(Json)), + "life": lambda n : setattr(self, 'life', n.get_object_value(Json)), + "per": lambda n : setattr(self, 'per', n.get_object_value(Json)), + "salvage": lambda n : setattr(self, 'salvage', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cost", self.cost) + writer.write_object_value("life", self.life) + writer.write_object_value("per", self.per) + writer.write_object_value("salvage", self.salvage) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/syd/syd_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/syd/syd_request_builder.py new file mode 100644 index 00000000000..353343d2989 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/syd/syd_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .syd_post_request_body import SydPostRequestBody + +class SydRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the syd method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SydRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/syd", path_parameters) + + async def post(self,body: SydPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action syd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: SydPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action syd + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SydRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SydRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SydRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SydRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t/t_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t/t_post_request_body.py new file mode 100644 index 00000000000..f4b96ed949e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t/t_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t/t_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t/t_request_builder.py new file mode 100644 index 00000000000..34e7cee2b25 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t/t_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .t_post_request_body import TPostRequestBody + +class TRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the t method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/t", path_parameters) + + async def post(self,body: TPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action t + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action t + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist/t_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist/t_dist_post_request_body.py new file mode 100644 index 00000000000..bd2b63f25fd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist/t_dist_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class T_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cumulative property + cumulative: Optional[Json] = None + # The degFreedom property + deg_freedom: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> T_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: T_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return T_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "degFreedom": lambda n : setattr(self, 'deg_freedom', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("degFreedom", self.deg_freedom) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist/t_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist/t_dist_request_builder.py new file mode 100644 index 00000000000..58a41e8de25 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist/t_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .t_dist_post_request_body import T_DistPostRequestBody + +class T_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the t_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new T_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/t_Dist", path_parameters) + + async def post(self,body: T_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action t_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: T_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action t_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> T_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: T_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return T_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class T_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_post_request_body.py new file mode 100644 index 00000000000..cb6f72c3750 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class T_Dist_2TPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The degFreedom property + deg_freedom: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> T_Dist_2TPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: T_Dist_2TPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return T_Dist_2TPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "degFreedom": lambda n : setattr(self, 'deg_freedom', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("degFreedom", self.deg_freedom) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_request_builder.py new file mode 100644 index 00000000000..3bcf32e9b81 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_2_t/t_dist_2_t_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .t_dist_2_t_post_request_body import T_Dist_2TPostRequestBody + +class T_Dist_2TRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the t_Dist_2T method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new T_Dist_2TRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/t_Dist_2T", path_parameters) + + async def post(self,body: T_Dist_2TPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action t_Dist_2T + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: T_Dist_2TPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action t_Dist_2T + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> T_Dist_2TRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: T_Dist_2TRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return T_Dist_2TRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class T_Dist_2TRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_post_request_body.py new file mode 100644 index 00000000000..8f1bee7c935 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class T_Dist_RTPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The degFreedom property + deg_freedom: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> T_Dist_RTPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: T_Dist_RTPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return T_Dist_RTPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "degFreedom": lambda n : setattr(self, 'deg_freedom', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("degFreedom", self.deg_freedom) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_request_builder.py new file mode 100644 index 00000000000..e1e4f6fb81d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_dist_r_t/t_dist_r_t_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .t_dist_r_t_post_request_body import T_Dist_RTPostRequestBody + +class T_Dist_RTRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the t_Dist_RT method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new T_Dist_RTRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/t_Dist_RT", path_parameters) + + async def post(self,body: T_Dist_RTPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action t_Dist_RT + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: T_Dist_RTPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action t_Dist_RT + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> T_Dist_RTRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: T_Dist_RTRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return T_Dist_RTRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class T_Dist_RTRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv/t_inv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv/t_inv_post_request_body.py new file mode 100644 index 00000000000..384a5746dea --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv/t_inv_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class T_InvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The degFreedom property + deg_freedom: Optional[Json] = None + # The probability property + probability: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> T_InvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: T_InvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return T_InvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "degFreedom": lambda n : setattr(self, 'deg_freedom', n.get_object_value(Json)), + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("degFreedom", self.deg_freedom) + writer.write_object_value("probability", self.probability) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv/t_inv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv/t_inv_request_builder.py new file mode 100644 index 00000000000..a2e5f3cd94c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv/t_inv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .t_inv_post_request_body import T_InvPostRequestBody + +class T_InvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the t_Inv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new T_InvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/t_Inv", path_parameters) + + async def post(self,body: T_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action t_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: T_InvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action t_Inv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> T_InvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: T_InvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return T_InvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class T_InvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_post_request_body.py new file mode 100644 index 00000000000..9356f153ca5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class T_Inv_2TPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The degFreedom property + deg_freedom: Optional[Json] = None + # The probability property + probability: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> T_Inv_2TPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: T_Inv_2TPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return T_Inv_2TPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "degFreedom": lambda n : setattr(self, 'deg_freedom', n.get_object_value(Json)), + "probability": lambda n : setattr(self, 'probability', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("degFreedom", self.deg_freedom) + writer.write_object_value("probability", self.probability) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_request_builder.py new file mode 100644 index 00000000000..8fe6e812d04 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/t_inv_2_t/t_inv_2_t_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .t_inv_2_t_post_request_body import T_Inv_2TPostRequestBody + +class T_Inv_2TRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the t_Inv_2T method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new T_Inv_2TRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/t_Inv_2T", path_parameters) + + async def post(self,body: T_Inv_2TPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action t_Inv_2T + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: T_Inv_2TPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action t_Inv_2T + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> T_Inv_2TRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: T_Inv_2TRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return T_Inv_2TRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class T_Inv_2TRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tan/tan_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tan/tan_post_request_body.py new file mode 100644 index 00000000000..27f19838ec6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tan/tan_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TanPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TanPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TanPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TanPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tan/tan_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tan/tan_request_builder.py new file mode 100644 index 00000000000..1750580ada5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tan/tan_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .tan_post_request_body import TanPostRequestBody + +class TanRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the tan method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TanRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/tan", path_parameters) + + async def post(self,body: TanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action tan + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action tan + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TanRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TanRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TanRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TanRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tanh/tanh_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tanh/tanh_post_request_body.py new file mode 100644 index 00000000000..1d2a6e00aa1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tanh/tanh_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TanhPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TanhPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TanhPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TanhPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tanh/tanh_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tanh/tanh_request_builder.py new file mode 100644 index 00000000000..74e5f51e2ba --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tanh/tanh_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .tanh_post_request_body import TanhPostRequestBody + +class TanhRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the tanh method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TanhRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/tanh", path_parameters) + + async def post(self,body: TanhPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action tanh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TanhPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action tanh + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TanhRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TanhRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TanhRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TanhRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_eq/tbill_eq_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_eq/tbill_eq_post_request_body.py new file mode 100644 index 00000000000..420f6bb3d51 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_eq/tbill_eq_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TbillEqPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The discount property + discount: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TbillEqPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TbillEqPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TbillEqPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "discount": lambda n : setattr(self, 'discount', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("discount", self.discount) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_eq/tbill_eq_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_eq/tbill_eq_request_builder.py new file mode 100644 index 00000000000..49edf9dcb7a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_eq/tbill_eq_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .tbill_eq_post_request_body import TbillEqPostRequestBody + +class TbillEqRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the tbillEq method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TbillEqRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/tbillEq", path_parameters) + + async def post(self,body: TbillEqPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action tbillEq + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TbillEqPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action tbillEq + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TbillEqRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TbillEqRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TbillEqRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TbillEqRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_price/tbill_price_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_price/tbill_price_post_request_body.py new file mode 100644 index 00000000000..ccbcdf035e4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_price/tbill_price_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TbillPricePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The discount property + discount: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TbillPricePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TbillPricePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TbillPricePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "discount": lambda n : setattr(self, 'discount', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("discount", self.discount) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_price/tbill_price_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_price/tbill_price_request_builder.py new file mode 100644 index 00000000000..7652a2f9c0f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_price/tbill_price_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .tbill_price_post_request_body import TbillPricePostRequestBody + +class TbillPriceRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the tbillPrice method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TbillPriceRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/tbillPrice", path_parameters) + + async def post(self,body: TbillPricePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action tbillPrice + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TbillPricePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action tbillPrice + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TbillPriceRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TbillPriceRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TbillPriceRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TbillPriceRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_yield/tbill_yield_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_yield/tbill_yield_post_request_body.py new file mode 100644 index 00000000000..8ab23ec3ac7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_yield/tbill_yield_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TbillYieldPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The maturity property + maturity: Optional[Json] = None + # The pr property + pr: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TbillYieldPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TbillYieldPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TbillYieldPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "pr": lambda n : setattr(self, 'pr', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("pr", self.pr) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_yield/tbill_yield_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_yield/tbill_yield_request_builder.py new file mode 100644 index 00000000000..76976c919f0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/tbill_yield/tbill_yield_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .tbill_yield_post_request_body import TbillYieldPostRequestBody + +class TbillYieldRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the tbillYield method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TbillYieldRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/tbillYield", path_parameters) + + async def post(self,body: TbillYieldPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action tbillYield + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TbillYieldPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action tbillYield + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TbillYieldRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TbillYieldRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TbillYieldRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TbillYieldRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/text/text_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/text/text_post_request_body.py new file mode 100644 index 00000000000..16aed869f36 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/text/text_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TextPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The formatText property + format_text: Optional[Json] = None + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TextPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TextPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TextPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "formatText": lambda n : setattr(self, 'format_text', n.get_object_value(Json)), + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("formatText", self.format_text) + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/text/text_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/text/text_request_builder.py new file mode 100644 index 00000000000..6765d47bf4d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/text/text_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .text_post_request_body import TextPostRequestBody + +class TextRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the text method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TextRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/text", path_parameters) + + async def post(self,body: TextPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action text + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TextPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action text + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TextRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TextRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TextRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TextRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/time/time_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/time/time_post_request_body.py new file mode 100644 index 00000000000..04e483ef23b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/time/time_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TimePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The hour property + hour: Optional[Json] = None + # The minute property + minute: Optional[Json] = None + # The second property + second: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TimePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TimePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TimePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "hour": lambda n : setattr(self, 'hour', n.get_object_value(Json)), + "minute": lambda n : setattr(self, 'minute', n.get_object_value(Json)), + "second": lambda n : setattr(self, 'second', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("hour", self.hour) + writer.write_object_value("minute", self.minute) + writer.write_object_value("second", self.second) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/time/time_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/time/time_request_builder.py new file mode 100644 index 00000000000..5ee80a93af2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/time/time_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .time_post_request_body import TimePostRequestBody + +class TimeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the time method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TimeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/time", path_parameters) + + async def post(self,body: TimePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action time + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TimePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action time + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TimeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TimeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TimeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TimeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/timevalue/timevalue_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/timevalue/timevalue_post_request_body.py new file mode 100644 index 00000000000..1ac14ef2810 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/timevalue/timevalue_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TimevaluePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The timeText property + time_text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TimevaluePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TimevaluePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TimevaluePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "timeText": lambda n : setattr(self, 'time_text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("timeText", self.time_text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/timevalue/timevalue_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/timevalue/timevalue_request_builder.py new file mode 100644 index 00000000000..2d94b590281 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/timevalue/timevalue_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .timevalue_post_request_body import TimevaluePostRequestBody + +class TimevalueRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the timevalue method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TimevalueRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/timevalue", path_parameters) + + async def post(self,body: TimevaluePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action timevalue + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TimevaluePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action timevalue + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TimevalueRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TimevalueRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TimevalueRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TimevalueRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/today/today_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/today/today_request_builder.py new file mode 100644 index 00000000000..7b97d10c58f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/today/today_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + +class TodayRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the today method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TodayRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/today", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action today + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action today + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TodayRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TodayRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TodayRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TodayRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim/trim_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim/trim_post_request_body.py new file mode 100644 index 00000000000..b73c55dfc4d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim/trim_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TrimPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TrimPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TrimPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TrimPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim/trim_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim/trim_request_builder.py new file mode 100644 index 00000000000..5fb3981fb3d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim/trim_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .trim_post_request_body import TrimPostRequestBody + +class TrimRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the trim method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TrimRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/trim", path_parameters) + + async def post(self,body: TrimPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action trim + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TrimPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action trim + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TrimRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TrimRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TrimRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TrimRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim_mean/trim_mean_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim_mean/trim_mean_post_request_body.py new file mode 100644 index 00000000000..7909756bfc8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim_mean/trim_mean_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TrimMeanPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + # The percent property + percent: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TrimMeanPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TrimMeanPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TrimMeanPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + "percent": lambda n : setattr(self, 'percent', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_object_value("percent", self.percent) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim_mean/trim_mean_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim_mean/trim_mean_request_builder.py new file mode 100644 index 00000000000..2f2fa296982 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trim_mean/trim_mean_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .trim_mean_post_request_body import TrimMeanPostRequestBody + +class TrimMeanRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the trimMean method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TrimMeanRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/trimMean", path_parameters) + + async def post(self,body: TrimMeanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action trimMean + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TrimMeanPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action trimMean + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TrimMeanRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TrimMeanRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TrimMeanRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TrimMeanRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/true_/true_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/true_/true_request_builder.py new file mode 100644 index 00000000000..b1359853710 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/true_/true_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + +class TrueRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the true method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TrueRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/true", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action true + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action true + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TrueRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TrueRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TrueRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TrueRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trunc/trunc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trunc/trunc_post_request_body.py new file mode 100644 index 00000000000..7bbff56a726 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trunc/trunc_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TruncPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The numDigits property + num_digits: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TruncPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TruncPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TruncPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "numDigits": lambda n : setattr(self, 'num_digits', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("numDigits", self.num_digits) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trunc/trunc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trunc/trunc_request_builder.py new file mode 100644 index 00000000000..8a83efb94c7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/trunc/trunc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .trunc_post_request_body import TruncPostRequestBody + +class TruncRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the trunc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TruncRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/trunc", path_parameters) + + async def post(self,body: TruncPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action trunc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TruncPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action trunc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TruncRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TruncRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TruncRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TruncRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/type/type_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/type/type_post_request_body.py new file mode 100644 index 00000000000..fcc5f525f75 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/type/type_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class TypePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> TypePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: TypePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return TypePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/type/type_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/type/type_request_builder.py new file mode 100644 index 00000000000..6625e396c8a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/type/type_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .type_post_request_body import TypePostRequestBody + +class TypeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the type method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TypeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/type", path_parameters) + + async def post(self,body: TypePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action type + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: TypePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action type + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TypeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TypeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TypeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TypeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unichar/unichar_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unichar/unichar_post_request_body.py new file mode 100644 index 00000000000..a0f80143143 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unichar/unichar_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class UnicharPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> UnicharPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: UnicharPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return UnicharPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unichar/unichar_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unichar/unichar_request_builder.py new file mode 100644 index 00000000000..805e770e88a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unichar/unichar_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .unichar_post_request_body import UnicharPostRequestBody + +class UnicharRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the unichar method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new UnicharRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/unichar", path_parameters) + + async def post(self,body: UnicharPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action unichar + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: UnicharPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action unichar + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> UnicharRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: UnicharRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return UnicharRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class UnicharRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unicode/unicode_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unicode/unicode_post_request_body.py new file mode 100644 index 00000000000..1ae7b87a079 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unicode/unicode_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class UnicodePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> UnicodePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: UnicodePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return UnicodePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unicode/unicode_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unicode/unicode_request_builder.py new file mode 100644 index 00000000000..325658ad5c9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/unicode/unicode_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .unicode_post_request_body import UnicodePostRequestBody + +class UnicodeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the unicode method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new UnicodeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/unicode", path_parameters) + + async def post(self,body: UnicodePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action unicode + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: UnicodePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action unicode + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> UnicodeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: UnicodeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return UnicodeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class UnicodeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/upper/upper_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/upper/upper_post_request_body.py new file mode 100644 index 00000000000..94f63aaed22 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/upper/upper_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class UpperPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> UpperPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: UpperPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return UpperPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/upper/upper_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/upper/upper_request_builder.py new file mode 100644 index 00000000000..dcc1d3eeabf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/upper/upper_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .upper_post_request_body import UpperPostRequestBody + +class UpperRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the upper method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new UpperRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/upper", path_parameters) + + async def post(self,body: UpperPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action upper + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: UpperPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action upper + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> UpperRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: UpperRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return UpperRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class UpperRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/usdollar/usdollar_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/usdollar/usdollar_post_request_body.py new file mode 100644 index 00000000000..95276b0ede7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/usdollar/usdollar_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class UsdollarPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The decimals property + decimals: Optional[Json] = None + # The number property + number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> UsdollarPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: UsdollarPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return UsdollarPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "decimals": lambda n : setattr(self, 'decimals', n.get_object_value(Json)), + "number": lambda n : setattr(self, 'number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("decimals", self.decimals) + writer.write_object_value("number", self.number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/usdollar/usdollar_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/usdollar/usdollar_request_builder.py new file mode 100644 index 00000000000..913da74400a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/usdollar/usdollar_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .usdollar_post_request_body import UsdollarPostRequestBody + +class UsdollarRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the usdollar method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new UsdollarRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/usdollar", path_parameters) + + async def post(self,body: UsdollarPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action usdollar + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: UsdollarPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action usdollar + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> UsdollarRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: UsdollarRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return UsdollarRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class UsdollarRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/value/value_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/value/value_post_request_body.py new file mode 100644 index 00000000000..91603923537 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/value/value_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class ValuePostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The text property + text: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ValuePostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ValuePostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ValuePostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "text": lambda n : setattr(self, 'text', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("text", self.text) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/value/value_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/value/value_request_builder.py new file mode 100644 index 00000000000..a545cbbf943 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/value/value_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .value_post_request_body import ValuePostRequestBody + +class ValueRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the value method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ValueRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/value", path_parameters) + + async def post(self,body: ValuePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action value + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: ValuePostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action value + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ValueRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ValueRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ValueRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ValueRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_a/var_a_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_a/var_a_post_request_body.py new file mode 100644 index 00000000000..cacc5c660d9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_a/var_a_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class VarAPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> VarAPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: VarAPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return VarAPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_a/var_a_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_a/var_a_request_builder.py new file mode 100644 index 00000000000..588dbb43f27 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_a/var_a_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .var_a_post_request_body import VarAPostRequestBody + +class VarARequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the varA method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new VarARequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/varA", path_parameters) + + async def post(self,body: VarAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action varA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: VarAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action varA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> VarARequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: VarARequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return VarARequestBuilder(self.request_adapter, raw_url) + + @dataclass + class VarARequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p/var_p_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p/var_p_post_request_body.py new file mode 100644 index 00000000000..2fae374c32b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p/var_p_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Var_PPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Var_PPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Var_PPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Var_PPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p/var_p_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p/var_p_request_builder.py new file mode 100644 index 00000000000..ef1bba7dcd7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p/var_p_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .var_p_post_request_body import Var_PPostRequestBody + +class Var_PRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the var_P method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Var_PRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/var_P", path_parameters) + + async def post(self,body: Var_PPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action var_P + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Var_PPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action var_P + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Var_PRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Var_PRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Var_PRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Var_PRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p_a/var_p_a_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p_a/var_p_a_post_request_body.py new file mode 100644 index 00000000000..8700b321cb7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p_a/var_p_a_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class VarPAPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> VarPAPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: VarPAPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return VarPAPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p_a/var_p_a_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p_a/var_p_a_request_builder.py new file mode 100644 index 00000000000..7907d706364 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_p_a/var_p_a_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .var_p_a_post_request_body import VarPAPostRequestBody + +class VarPARequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the varPA method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new VarPARequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/varPA", path_parameters) + + async def post(self,body: VarPAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action varPA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: VarPAPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action varPA + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> VarPARequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: VarPARequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return VarPARequestBuilder(self.request_adapter, raw_url) + + @dataclass + class VarPARequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_s/var_s_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_s/var_s_post_request_body.py new file mode 100644 index 00000000000..0ff38b362e1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_s/var_s_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Var_SPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Var_SPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Var_SPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Var_SPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_s/var_s_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_s/var_s_request_builder.py new file mode 100644 index 00000000000..db3950c1114 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/var_s/var_s_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .var_s_post_request_body import Var_SPostRequestBody + +class Var_SRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the var_S method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Var_SRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/var_S", path_parameters) + + async def post(self,body: Var_SPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action var_S + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Var_SPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action var_S + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Var_SRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Var_SRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Var_SRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Var_SRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vdb/vdb_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vdb/vdb_post_request_body.py new file mode 100644 index 00000000000..5182c4ffe59 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vdb/vdb_post_request_body.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class VdbPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The cost property + cost: Optional[Json] = None + # The endPeriod property + end_period: Optional[Json] = None + # The factor property + factor: Optional[Json] = None + # The life property + life: Optional[Json] = None + # The noSwitch property + no_switch: Optional[Json] = None + # The salvage property + salvage: Optional[Json] = None + # The startPeriod property + start_period: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> VdbPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: VdbPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return VdbPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "cost": lambda n : setattr(self, 'cost', n.get_object_value(Json)), + "endPeriod": lambda n : setattr(self, 'end_period', n.get_object_value(Json)), + "factor": lambda n : setattr(self, 'factor', n.get_object_value(Json)), + "life": lambda n : setattr(self, 'life', n.get_object_value(Json)), + "noSwitch": lambda n : setattr(self, 'no_switch', n.get_object_value(Json)), + "salvage": lambda n : setattr(self, 'salvage', n.get_object_value(Json)), + "startPeriod": lambda n : setattr(self, 'start_period', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("cost", self.cost) + writer.write_object_value("endPeriod", self.end_period) + writer.write_object_value("factor", self.factor) + writer.write_object_value("life", self.life) + writer.write_object_value("noSwitch", self.no_switch) + writer.write_object_value("salvage", self.salvage) + writer.write_object_value("startPeriod", self.start_period) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vdb/vdb_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vdb/vdb_request_builder.py new file mode 100644 index 00000000000..1ee08e51f1f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vdb/vdb_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .vdb_post_request_body import VdbPostRequestBody + +class VdbRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the vdb method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new VdbRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/vdb", path_parameters) + + async def post(self,body: VdbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action vdb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: VdbPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action vdb + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> VdbRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: VdbRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return VdbRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class VdbRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vlookup/vlookup_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vlookup/vlookup_post_request_body.py new file mode 100644 index 00000000000..a737c5377ee --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vlookup/vlookup_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class VlookupPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The colIndexNum property + col_index_num: Optional[Json] = None + # The lookupValue property + lookup_value: Optional[Json] = None + # The rangeLookup property + range_lookup: Optional[Json] = None + # The tableArray property + table_array: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> VlookupPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: VlookupPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return VlookupPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "colIndexNum": lambda n : setattr(self, 'col_index_num', n.get_object_value(Json)), + "lookupValue": lambda n : setattr(self, 'lookup_value', n.get_object_value(Json)), + "rangeLookup": lambda n : setattr(self, 'range_lookup', n.get_object_value(Json)), + "tableArray": lambda n : setattr(self, 'table_array', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("colIndexNum", self.col_index_num) + writer.write_object_value("lookupValue", self.lookup_value) + writer.write_object_value("rangeLookup", self.range_lookup) + writer.write_object_value("tableArray", self.table_array) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vlookup/vlookup_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vlookup/vlookup_request_builder.py new file mode 100644 index 00000000000..4bacc654606 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/vlookup/vlookup_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .vlookup_post_request_body import VlookupPostRequestBody + +class VlookupRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the vlookup method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new VlookupRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/vlookup", path_parameters) + + async def post(self,body: VlookupPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action vlookup + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: VlookupPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action vlookup + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> VlookupRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: VlookupRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return VlookupRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class VlookupRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/week_num/week_num_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/week_num/week_num_post_request_body.py new file mode 100644 index 00000000000..ed47eb123d5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/week_num/week_num_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class WeekNumPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The returnType property + return_type: Optional[Json] = None + # The serialNumber property + serial_number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> WeekNumPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: WeekNumPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return WeekNumPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "returnType": lambda n : setattr(self, 'return_type', n.get_object_value(Json)), + "serialNumber": lambda n : setattr(self, 'serial_number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("returnType", self.return_type) + writer.write_object_value("serialNumber", self.serial_number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/week_num/week_num_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/week_num/week_num_request_builder.py new file mode 100644 index 00000000000..036260becac --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/week_num/week_num_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .week_num_post_request_body import WeekNumPostRequestBody + +class WeekNumRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the weekNum method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WeekNumRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/weekNum", path_parameters) + + async def post(self,body: WeekNumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action weekNum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: WeekNumPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action weekNum + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WeekNumRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WeekNumRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WeekNumRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WeekNumRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weekday/weekday_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weekday/weekday_post_request_body.py new file mode 100644 index 00000000000..b6d71998ade --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weekday/weekday_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class WeekdayPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The returnType property + return_type: Optional[Json] = None + # The serialNumber property + serial_number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> WeekdayPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: WeekdayPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return WeekdayPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "returnType": lambda n : setattr(self, 'return_type', n.get_object_value(Json)), + "serialNumber": lambda n : setattr(self, 'serial_number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("returnType", self.return_type) + writer.write_object_value("serialNumber", self.serial_number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weekday/weekday_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weekday/weekday_request_builder.py new file mode 100644 index 00000000000..fe75d1c81eb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weekday/weekday_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .weekday_post_request_body import WeekdayPostRequestBody + +class WeekdayRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the weekday method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WeekdayRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/weekday", path_parameters) + + async def post(self,body: WeekdayPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action weekday + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: WeekdayPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action weekday + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WeekdayRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WeekdayRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WeekdayRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WeekdayRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weibull_dist/weibull_dist_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weibull_dist/weibull_dist_post_request_body.py new file mode 100644 index 00000000000..b39f51c654d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weibull_dist/weibull_dist_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Weibull_DistPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The alpha property + alpha: Optional[Json] = None + # The beta property + beta: Optional[Json] = None + # The cumulative property + cumulative: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Weibull_DistPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Weibull_DistPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Weibull_DistPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "alpha": lambda n : setattr(self, 'alpha', n.get_object_value(Json)), + "beta": lambda n : setattr(self, 'beta', n.get_object_value(Json)), + "cumulative": lambda n : setattr(self, 'cumulative', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("alpha", self.alpha) + writer.write_object_value("beta", self.beta) + writer.write_object_value("cumulative", self.cumulative) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weibull_dist/weibull_dist_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weibull_dist/weibull_dist_request_builder.py new file mode 100644 index 00000000000..6ecb6417799 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/weibull_dist/weibull_dist_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .weibull_dist_post_request_body import Weibull_DistPostRequestBody + +class Weibull_DistRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the weibull_Dist method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Weibull_DistRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/weibull_Dist", path_parameters) + + async def post(self,body: Weibull_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action weibull_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Weibull_DistPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action weibull_Dist + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Weibull_DistRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Weibull_DistRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Weibull_DistRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Weibull_DistRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day/work_day_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day/work_day_post_request_body.py new file mode 100644 index 00000000000..0caa188dacd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day/work_day_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class WorkDayPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The days property + days: Optional[Json] = None + # The holidays property + holidays: Optional[Json] = None + # The startDate property + start_date: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> WorkDayPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: WorkDayPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return WorkDayPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "days": lambda n : setattr(self, 'days', n.get_object_value(Json)), + "holidays": lambda n : setattr(self, 'holidays', n.get_object_value(Json)), + "startDate": lambda n : setattr(self, 'start_date', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("days", self.days) + writer.write_object_value("holidays", self.holidays) + writer.write_object_value("startDate", self.start_date) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day/work_day_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day/work_day_request_builder.py new file mode 100644 index 00000000000..024051382a1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day/work_day_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .work_day_post_request_body import WorkDayPostRequestBody + +class WorkDayRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the workDay method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkDayRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/workDay", path_parameters) + + async def post(self,body: WorkDayPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action workDay + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: WorkDayPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action workDay + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkDayRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkDayRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkDayRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorkDayRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day_intl/work_day_intl_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day_intl/work_day_intl_post_request_body.py new file mode 100644 index 00000000000..b539fbf0b4b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day_intl/work_day_intl_post_request_body.py @@ -0,0 +1,68 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class WorkDay_IntlPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The days property + days: Optional[Json] = None + # The holidays property + holidays: Optional[Json] = None + # The startDate property + start_date: Optional[Json] = None + # The weekend property + weekend: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> WorkDay_IntlPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: WorkDay_IntlPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return WorkDay_IntlPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "days": lambda n : setattr(self, 'days', n.get_object_value(Json)), + "holidays": lambda n : setattr(self, 'holidays', n.get_object_value(Json)), + "startDate": lambda n : setattr(self, 'start_date', n.get_object_value(Json)), + "weekend": lambda n : setattr(self, 'weekend', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("days", self.days) + writer.write_object_value("holidays", self.holidays) + writer.write_object_value("startDate", self.start_date) + writer.write_object_value("weekend", self.weekend) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day_intl/work_day_intl_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day_intl/work_day_intl_request_builder.py new file mode 100644 index 00000000000..e10962da7d0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/work_day_intl/work_day_intl_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .work_day_intl_post_request_body import WorkDay_IntlPostRequestBody + +class WorkDay_IntlRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the workDay_Intl method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkDay_IntlRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/workDay_Intl", path_parameters) + + async def post(self,body: WorkDay_IntlPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action workDay_Intl + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: WorkDay_IntlPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action workDay_Intl + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkDay_IntlRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkDay_IntlRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkDay_IntlRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorkDay_IntlRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xirr/xirr_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xirr/xirr_post_request_body.py new file mode 100644 index 00000000000..1941ff71e52 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xirr/xirr_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class XirrPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The dates property + dates: Optional[Json] = None + # The guess property + guess: Optional[Json] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> XirrPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: XirrPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return XirrPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "dates": lambda n : setattr(self, 'dates', n.get_object_value(Json)), + "guess": lambda n : setattr(self, 'guess', n.get_object_value(Json)), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("dates", self.dates) + writer.write_object_value("guess", self.guess) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xirr/xirr_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xirr/xirr_request_builder.py new file mode 100644 index 00000000000..bcd7a50365a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xirr/xirr_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .xirr_post_request_body import XirrPostRequestBody + +class XirrRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the xirr method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new XirrRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/xirr", path_parameters) + + async def post(self,body: XirrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action xirr + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: XirrPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action xirr + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> XirrRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: XirrRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return XirrRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class XirrRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xnpv/xnpv_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xnpv/xnpv_post_request_body.py new file mode 100644 index 00000000000..12832e31a68 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xnpv/xnpv_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class XnpvPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The dates property + dates: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> XnpvPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: XnpvPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return XnpvPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "dates": lambda n : setattr(self, 'dates', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("dates", self.dates) + writer.write_object_value("rate", self.rate) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xnpv/xnpv_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xnpv/xnpv_request_builder.py new file mode 100644 index 00000000000..1ba50b351f7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xnpv/xnpv_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .xnpv_post_request_body import XnpvPostRequestBody + +class XnpvRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the xnpv method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new XnpvRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/xnpv", path_parameters) + + async def post(self,body: XnpvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action xnpv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: XnpvPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action xnpv + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> XnpvRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: XnpvRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return XnpvRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class XnpvRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xor/xor_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xor/xor_post_request_body.py new file mode 100644 index 00000000000..a58c58182bb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xor/xor_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class XorPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> XorPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: XorPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return XorPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xor/xor_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xor/xor_request_builder.py new file mode 100644 index 00000000000..6f306cea14a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/xor/xor_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .xor_post_request_body import XorPostRequestBody + +class XorRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the xor method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new XorRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/xor", path_parameters) + + async def post(self,body: XorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action xor + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: XorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action xor + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> XorRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: XorRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return XorRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class XorRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year/year_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year/year_post_request_body.py new file mode 100644 index 00000000000..8383c3749b6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year/year_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class YearPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The serialNumber property + serial_number: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> YearPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: YearPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return YearPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "serialNumber": lambda n : setattr(self, 'serial_number', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("serialNumber", self.serial_number) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year/year_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year/year_request_builder.py new file mode 100644 index 00000000000..f4bdffc9672 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year/year_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .year_post_request_body import YearPostRequestBody + +class YearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the year method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new YearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/year", path_parameters) + + async def post(self,body: YearPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action year + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: YearPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action year + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> YearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: YearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return YearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class YearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year_frac/year_frac_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year_frac/year_frac_post_request_body.py new file mode 100644 index 00000000000..ba3c786126c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year_frac/year_frac_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class YearFracPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The endDate property + end_date: Optional[Json] = None + # The startDate property + start_date: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> YearFracPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: YearFracPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return YearFracPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "endDate": lambda n : setattr(self, 'end_date', n.get_object_value(Json)), + "startDate": lambda n : setattr(self, 'start_date', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("endDate", self.end_date) + writer.write_object_value("startDate", self.start_date) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year_frac/year_frac_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year_frac/year_frac_request_builder.py new file mode 100644 index 00000000000..29207a1efcd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/year_frac/year_frac_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .year_frac_post_request_body import YearFracPostRequestBody + +class YearFracRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the yearFrac method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new YearFracRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/yearFrac", path_parameters) + + async def post(self,body: YearFracPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action yearFrac + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: YearFracPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action yearFrac + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> YearFracRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: YearFracRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return YearFracRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class YearFracRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_/yield_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_/yield_post_request_body.py new file mode 100644 index 00000000000..89b1654713b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_/yield_post_request_body.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class YieldPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The frequency property + frequency: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The pr property + pr: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The redemption property + redemption: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> YieldPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: YieldPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return YieldPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "frequency": lambda n : setattr(self, 'frequency', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "pr": lambda n : setattr(self, 'pr', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "redemption": lambda n : setattr(self, 'redemption', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("frequency", self.frequency) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("pr", self.pr) + writer.write_object_value("rate", self.rate) + writer.write_object_value("redemption", self.redemption) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_/yield_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_/yield_request_builder.py new file mode 100644 index 00000000000..4f08aa71201 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_/yield_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .yield_post_request_body import YieldPostRequestBody + +class YieldRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the yield method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new YieldRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/yield", path_parameters) + + async def post(self,body: YieldPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action yield + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: YieldPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action yield + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> YieldRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: YieldRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return YieldRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class YieldRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_disc/yield_disc_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_disc/yield_disc_post_request_body.py new file mode 100644 index 00000000000..82b4ba5edd0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_disc/yield_disc_post_request_body.py @@ -0,0 +1,72 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class YieldDiscPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The pr property + pr: Optional[Json] = None + # The redemption property + redemption: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> YieldDiscPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: YieldDiscPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return YieldDiscPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "pr": lambda n : setattr(self, 'pr', n.get_object_value(Json)), + "redemption": lambda n : setattr(self, 'redemption', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("pr", self.pr) + writer.write_object_value("redemption", self.redemption) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_disc/yield_disc_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_disc/yield_disc_request_builder.py new file mode 100644 index 00000000000..1189b866e61 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_disc/yield_disc_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .yield_disc_post_request_body import YieldDiscPostRequestBody + +class YieldDiscRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the yieldDisc method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new YieldDiscRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/yieldDisc", path_parameters) + + async def post(self,body: YieldDiscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action yieldDisc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: YieldDiscPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action yieldDisc + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> YieldDiscRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: YieldDiscRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return YieldDiscRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class YieldDiscRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_mat/yield_mat_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_mat/yield_mat_post_request_body.py new file mode 100644 index 00000000000..6737bc3a92a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_mat/yield_mat_post_request_body.py @@ -0,0 +1,76 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class YieldMatPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The basis property + basis: Optional[Json] = None + # The issue property + issue: Optional[Json] = None + # The maturity property + maturity: Optional[Json] = None + # The pr property + pr: Optional[Json] = None + # The rate property + rate: Optional[Json] = None + # The settlement property + settlement: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> YieldMatPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: YieldMatPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return YieldMatPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "basis": lambda n : setattr(self, 'basis', n.get_object_value(Json)), + "issue": lambda n : setattr(self, 'issue', n.get_object_value(Json)), + "maturity": lambda n : setattr(self, 'maturity', n.get_object_value(Json)), + "pr": lambda n : setattr(self, 'pr', n.get_object_value(Json)), + "rate": lambda n : setattr(self, 'rate', n.get_object_value(Json)), + "settlement": lambda n : setattr(self, 'settlement', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("basis", self.basis) + writer.write_object_value("issue", self.issue) + writer.write_object_value("maturity", self.maturity) + writer.write_object_value("pr", self.pr) + writer.write_object_value("rate", self.rate) + writer.write_object_value("settlement", self.settlement) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_mat/yield_mat_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_mat/yield_mat_request_builder.py new file mode 100644 index 00000000000..5a0b4a2c15f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/yield_mat/yield_mat_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .yield_mat_post_request_body import YieldMatPostRequestBody + +class YieldMatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the yieldMat method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new YieldMatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/yieldMat", path_parameters) + + async def post(self,body: YieldMatPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action yieldMat + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: YieldMatPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action yieldMat + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> YieldMatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: YieldMatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return YieldMatRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class YieldMatRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/z_test/z_test_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/z_test/z_test_post_request_body.py new file mode 100644 index 00000000000..f26491fc5a3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/z_test/z_test_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class Z_TestPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The array property + array: Optional[Json] = None + # The sigma property + sigma: Optional[Json] = None + # The x property + x: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> Z_TestPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: Z_TestPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return Z_TestPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "array": lambda n : setattr(self, 'array', n.get_object_value(Json)), + "sigma": lambda n : setattr(self, 'sigma', n.get_object_value(Json)), + "x": lambda n : setattr(self, 'x', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("array", self.array) + writer.write_object_value("sigma", self.sigma) + writer.write_object_value("x", self.x) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/z_test/z_test_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/z_test/z_test_request_builder.py new file mode 100644 index 00000000000..885342094db --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/functions/z_test/z_test_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_function_result import WorkbookFunctionResult + from .z_test_post_request_body import Z_TestPostRequestBody + +class Z_TestRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the z_Test method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new Z_TestRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/functions/z_Test", path_parameters) + + async def post(self,body: Z_TestPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFunctionResult]: + """ + Invoke action z_Test + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFunctionResult] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_function_result import WorkbookFunctionResult + + return await self.request_adapter.send_async(request_info, WorkbookFunctionResult, error_mapping) + + def to_post_request_information(self,body: Z_TestPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action z_Test + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> Z_TestRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: Z_TestRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return Z_TestRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class Z_TestRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add/add_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add/add_post_request_body.py new file mode 100644 index 00000000000..4cd99087a6d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add/add_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...........models.json import Json + +@dataclass +class AddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The comment property + comment: Optional[str] = None + # The name property + name: Optional[str] = None + # The reference property + reference: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...........models.json import Json + + from ...........models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "comment": lambda n : setattr(self, 'comment', n.get_str_value()), + "name": lambda n : setattr(self, 'name', n.get_str_value()), + "reference": lambda n : setattr(self, 'reference', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("comment", self.comment) + writer.write_str_value("name", self.name) + writer.write_object_value("reference", self.reference) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add/add_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add/add_request_builder.py new file mode 100644 index 00000000000..ed6bf71aa8c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add/add_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_named_item import WorkbookNamedItem + from .add_post_request_body import AddPostRequestBody + +class AddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the add method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/names/add", path_parameters) + + async def post(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookNamedItem]: + """ + Adds a new name to the collection of the given scope using the user's locale for the formula. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItem] + Find more info here: https://learn.microsoft.com/graph/api/nameditem-add?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_named_item import WorkbookNamedItem + + return await self.request_adapter.send_async(request_info, WorkbookNamedItem, error_mapping) + + def to_post_request_information(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Adds a new name to the collection of the given scope using the user's locale for the formula. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add_formula_local/add_formula_local_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add_formula_local/add_formula_local_post_request_body.py new file mode 100644 index 00000000000..b2983f9b488 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add_formula_local/add_formula_local_post_request_body.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class AddFormulaLocalPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The comment property + comment: Optional[str] = None + # The formula property + formula: Optional[str] = None + # The name property + name: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddFormulaLocalPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddFormulaLocalPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddFormulaLocalPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "comment": lambda n : setattr(self, 'comment', n.get_str_value()), + "formula": lambda n : setattr(self, 'formula', n.get_str_value()), + "name": lambda n : setattr(self, 'name', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("comment", self.comment) + writer.write_str_value("formula", self.formula) + writer.write_str_value("name", self.name) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add_formula_local/add_formula_local_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add_formula_local/add_formula_local_request_builder.py new file mode 100644 index 00000000000..bc93b29f525 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/add_formula_local/add_formula_local_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_named_item import WorkbookNamedItem + from .add_formula_local_post_request_body import AddFormulaLocalPostRequestBody + +class AddFormulaLocalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the addFormulaLocal method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddFormulaLocalRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/names/addFormulaLocal", path_parameters) + + async def post(self,body: AddFormulaLocalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookNamedItem]: + """ + Adds a new name to the collection of the given scope using the user's locale for the formula. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItem] + Find more info here: https://learn.microsoft.com/graph/api/nameditem-addformulalocal?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_named_item import WorkbookNamedItem + + return await self.request_adapter.send_async(request_info, WorkbookNamedItem, error_mapping) + + def to_post_request_information(self,body: AddFormulaLocalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Adds a new name to the collection of the given scope using the user's locale for the formula. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddFormulaLocalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddFormulaLocalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddFormulaLocalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddFormulaLocalRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/count/count_request_builder.py new file mode 100644 index 00000000000..0ad21ac330c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/names/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/range/range_request_builder.py new file mode 100644 index 00000000000..82d289a8dd0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/range/range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/names/{workbookNamedItem%2Did}/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/nameditem-range?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/workbook_named_item_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/workbook_named_item_item_request_builder.py new file mode 100644 index 00000000000..8bca1bc655e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/workbook_named_item_item_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_named_item import WorkbookNamedItem + from .range.range_request_builder import RangeRequestBuilder + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + +class WorkbookNamedItemItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the names property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookNamedItemItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/names/{workbookNamedItem%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property names for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookNamedItemItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookNamedItem]: + """ + Represents a collection of workbooks scoped named items (named ranges and constants). Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_named_item import WorkbookNamedItem + + return await self.request_adapter.send_async(request_info, WorkbookNamedItem, error_mapping) + + async def patch(self,body: WorkbookNamedItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookNamedItem]: + """ + Update the navigation property names in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_named_item import WorkbookNamedItem + + return await self.request_adapter.send_async(request_info, WorkbookNamedItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property names for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookNamedItemItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of workbooks scoped named items (named ranges and constants). Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookNamedItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property names in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookNamedItemItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookNamedItemItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookNamedItemItemRequestBuilder(self.request_adapter, raw_url) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheet(self) -> WorksheetRequestBuilder: + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookNamedItem entity. + """ + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + + return WorksheetRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookNamedItemItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookNamedItemItemRequestBuilderGetQueryParameters(): + """ + Represents a collection of workbooks scoped named items (named ranges and constants). Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookNamedItemItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookNamedItemItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookNamedItemItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/worksheet/worksheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..870ba9c7d67 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/item/worksheet/worksheet_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_worksheet import WorkbookWorksheet + +class WorksheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookNamedItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/names/{workbookNamedItem%2Did}/worksheet{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> WorksheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorksheetRequestBuilderGetQueryParameters(): + """ + Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/names_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/names_request_builder.py new file mode 100644 index 00000000000..818354b1344 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/names/names_request_builder.py @@ -0,0 +1,227 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.workbook_named_item import WorkbookNamedItem + from ..........models.workbook_named_item_collection_response import WorkbookNamedItemCollectionResponse + from .add.add_request_builder import AddRequestBuilder + from .add_formula_local.add_formula_local_request_builder import AddFormulaLocalRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_named_item_item_request_builder import WorkbookNamedItemItemRequestBuilder + +class NamesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the names property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NamesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/names{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_named_item_id(self,workbook_named_item_id: str) -> WorkbookNamedItemItemRequestBuilder: + """ + Provides operations to manage the names property of the microsoft.graph.workbook entity. + param workbook_named_item_id: The unique identifier of workbookNamedItem + Returns: WorkbookNamedItemItemRequestBuilder + """ + if not workbook_named_item_id: + raise TypeError("workbook_named_item_id cannot be null.") + from .item.workbook_named_item_item_request_builder import WorkbookNamedItemItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookNamedItem%2Did"] = workbook_named_item_id + return WorkbookNamedItemItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[NamesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookNamedItemCollectionResponse]: + """ + Represents a collection of workbooks scoped named items (named ranges and constants). Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_named_item_collection_response import WorkbookNamedItemCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookNamedItemCollectionResponse, error_mapping) + + async def post(self,body: WorkbookNamedItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookNamedItem]: + """ + Create new navigation property to names for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_named_item import WorkbookNamedItem + + return await self.request_adapter.send_async(request_info, WorkbookNamedItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[NamesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of workbooks scoped named items (named ranges and constants). Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookNamedItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to names for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NamesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NamesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NamesRequestBuilder(self.request_adapter, raw_url) + + @property + def add(self) -> AddRequestBuilder: + """ + Provides operations to call the add method. + """ + from .add.add_request_builder import AddRequestBuilder + + return AddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def add_formula_local(self) -> AddFormulaLocalRequestBuilder: + """ + Provides operations to call the addFormulaLocal method. + """ + from .add_formula_local.add_formula_local_request_builder import AddFormulaLocalRequestBuilder + + return AddFormulaLocalRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class NamesRequestBuilderGetQueryParameters(): + """ + Represents a collection of workbooks scoped named items (named ranges and constants). Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class NamesRequestBuilderGetRequestConfiguration(RequestConfiguration[NamesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class NamesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/operations/item/workbook_operation_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/operations/item/workbook_operation_item_request_builder.py new file mode 100644 index 00000000000..4d9943b4099 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/operations/item/workbook_operation_item_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_operation import WorkbookOperation + +class WorkbookOperationItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the operations property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookOperationItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/operations/{workbookOperation%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property operations for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookOperationItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookOperation]: + """ + The status of workbook operations. Getting an operation collection is not supported, but you can get the status of a long-running operation if the Location header is returned in the response. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookOperation] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_operation import WorkbookOperation + + return await self.request_adapter.send_async(request_info, WorkbookOperation, error_mapping) + + async def patch(self,body: WorkbookOperation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookOperation]: + """ + Update the navigation property operations in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookOperation] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_operation import WorkbookOperation + + return await self.request_adapter.send_async(request_info, WorkbookOperation, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property operations for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookOperationItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The status of workbook operations. Getting an operation collection is not supported, but you can get the status of a long-running operation if the Location header is returned in the response. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookOperation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property operations in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookOperationItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookOperationItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookOperationItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorkbookOperationItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookOperationItemRequestBuilderGetQueryParameters(): + """ + The status of workbook operations. Getting an operation collection is not supported, but you can get the status of a long-running operation if the Location header is returned in the response. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookOperationItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookOperationItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookOperationItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/operations/operations_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/operations/operations_request_builder.py new file mode 100644 index 00000000000..29151134764 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/operations/operations_request_builder.py @@ -0,0 +1,177 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.workbook_operation import WorkbookOperation + from ..........models.workbook_operation_collection_response import WorkbookOperationCollectionResponse + from .item.workbook_operation_item_request_builder import WorkbookOperationItemRequestBuilder + +class OperationsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the operations property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new OperationsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/operations{?%24expand,%24orderby,%24search,%24select}", path_parameters) + + def by_workbook_operation_id(self,workbook_operation_id: str) -> WorkbookOperationItemRequestBuilder: + """ + Provides operations to manage the operations property of the microsoft.graph.workbook entity. + param workbook_operation_id: The unique identifier of workbookOperation + Returns: WorkbookOperationItemRequestBuilder + """ + if not workbook_operation_id: + raise TypeError("workbook_operation_id cannot be null.") + from .item.workbook_operation_item_request_builder import WorkbookOperationItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookOperation%2Did"] = workbook_operation_id + return WorkbookOperationItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[OperationsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookOperationCollectionResponse]: + """ + The status of workbook operations. Getting an operation collection is not supported, but you can get the status of a long-running operation if the Location header is returned in the response. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookOperationCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_operation_collection_response import WorkbookOperationCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookOperationCollectionResponse, error_mapping) + + async def post(self,body: WorkbookOperation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookOperation]: + """ + Create new navigation property to operations for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookOperation] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_operation import WorkbookOperation + + return await self.request_adapter.send_async(request_info, WorkbookOperation, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[OperationsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The status of workbook operations. Getting an operation collection is not supported, but you can get the status of a long-running operation if the Location header is returned in the response. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookOperation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to operations for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> OperationsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OperationsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OperationsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class OperationsRequestBuilderGetQueryParameters(): + """ + The status of workbook operations. Getting an operation collection is not supported, but you can get the status of a long-running operation if the Location header is returned in the response. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class OperationsRequestBuilderGetRequestConfiguration(RequestConfiguration[OperationsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class OperationsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/refresh_session/refresh_session_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/refresh_session/refresh_session_request_builder.py new file mode 100644 index 00000000000..0882b21899e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/refresh_session/refresh_session_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class RefreshSessionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the refreshSession method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RefreshSessionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/refreshSession", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Use this API to refresh an existing workbook session. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/workbook-refreshsession?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Use this API to refresh an existing workbook session. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RefreshSessionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RefreshSessionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RefreshSessionRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RefreshSessionRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/session_info_resource_with_key/session_info_resource_with_key_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/session_info_resource_with_key/session_info_resource_with_key_request_builder.py new file mode 100644 index 00000000000..8f1d4390173 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/session_info_resource_with_key/session_info_resource_with_key_request_builder.py @@ -0,0 +1,83 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.workbook_session_info import WorkbookSessionInfo + +class SessionInfoResourceWithKeyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sessionInfoResource method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], key: Optional[str] = None) -> None: + """ + Instantiates a new SessionInfoResourceWithKeyRequestBuilder and sets the default values. + param key: Usage: key='{key}' + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['key'] = str(key) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/sessionInfoResource(key='{key}')", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookSessionInfo]: + """ + Invoke function sessionInfoResource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookSessionInfo] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_session_info import WorkbookSessionInfo + + return await self.request_adapter.send_async(request_info, WorkbookSessionInfo, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function sessionInfoResource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> SessionInfoResourceWithKeyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SessionInfoResourceWithKeyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SessionInfoResourceWithKeyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SessionInfoResourceWithKeyRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/table_row_operation_result_with_key/table_row_operation_result_with_key_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/table_row_operation_result_with_key/table_row_operation_result_with_key_request_builder.py new file mode 100644 index 00000000000..6e62b3e1c1a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/table_row_operation_result_with_key/table_row_operation_result_with_key_request_builder.py @@ -0,0 +1,84 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.workbook_table_row import WorkbookTableRow + +class TableRowOperationResultWithKeyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the tableRowOperationResult method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], key: Optional[str] = None) -> None: + """ + Instantiates a new TableRowOperationResultWithKeyRequestBuilder and sets the default values. + param key: Usage: key='{key}' + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['key'] = str(key) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tableRowOperationResult(key='{key}')", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + This function is the last in a series of steps to create a workbookTableRow resource asynchronously. A best practice to create multiple table rows is to batch them in one create tableRow operation and carry out the operation asynchronously. An asynchronous request to create table rows involves the following steps:1. Issue an async Create tableRow request and get the query URL returned in the Location response header.2. Use the query URL returned from step 1 to issue the Get workbookOperation request and get the operation ID for step 3. Alternatively, for convenience, after you get a succeeded operationStatus result, you can get the query URL from the resourceLocation property of the workbookOperation returned in the response, and apply the query URL to step 3. 3. Use the query URL returned from step 2 as the GET request URL for this function tableRowOperationResult. A successful function call returns the new table rows in a workbookTableRow resource. This function does not do anything if called independently. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + Find more info here: https://learn.microsoft.com/graph/api/workbook-tablerowoperationresult?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + This function is the last in a series of steps to create a workbookTableRow resource asynchronously. A best practice to create multiple table rows is to batch them in one create tableRow operation and carry out the operation asynchronously. An asynchronous request to create table rows involves the following steps:1. Issue an async Create tableRow request and get the query URL returned in the Location response header.2. Use the query URL returned from step 1 to issue the Get workbookOperation request and get the operation ID for step 3. Alternatively, for convenience, after you get a succeeded operationStatus result, you can get the query URL from the resourceLocation property of the workbookOperation returned in the response, and apply the query URL to step 3. 3. Use the query URL returned from step 2 as the GET request URL for this function tableRowOperationResult. A successful function call returns the new table rows in a workbookTableRow resource. This function does not do anything if called independently. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TableRowOperationResultWithKeyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TableRowOperationResultWithKeyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TableRowOperationResultWithKeyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TableRowOperationResultWithKeyRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/add/add_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/add/add_post_request_body.py new file mode 100644 index 00000000000..01be599b175 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/add/add_post_request_body.py @@ -0,0 +1,53 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class AddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The address property + address: Optional[str] = None + # The hasHeaders property + has_headers: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "address": lambda n : setattr(self, 'address', n.get_str_value()), + "hasHeaders": lambda n : setattr(self, 'has_headers', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("address", self.address) + writer.write_bool_value("hasHeaders", self.has_headers) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/add/add_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/add/add_request_builder.py new file mode 100644 index 00000000000..c975caacc8a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/add/add_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_table import WorkbookTable + from .add_post_request_body import AddPostRequestBody + +class AddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the add method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/add", path_parameters) + + async def post(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTable]: + """ + Use this API to create a new Table. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTable] + Find more info here: https://learn.microsoft.com/graph/api/workbook-post-tables?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_table import WorkbookTable + + return await self.request_adapter.send_async(request_info, WorkbookTable, error_mapping) + + def to_post_request_information(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Use this API to create a new Table. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/count/count_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/count/count_get_response.py new file mode 100644 index 00000000000..adc36fe76ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/count/count_request_builder.py new file mode 100644 index 00000000000..7d4278e5196 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/count/count_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from .count_get_response import CountGetResponse + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the count method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/count()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CountGetResponse]: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CountGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .count_get_response import CountGetResponse + + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/clear_filters/clear_filters_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/clear_filters/clear_filters_request_builder.py new file mode 100644 index 00000000000..c2086b57686 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/clear_filters/clear_filters_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + +class ClearFiltersRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clearFilters method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearFiltersRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/clearFilters", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clears all the filters currently applied on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/table-clearfilters?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clears all the filters currently applied on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearFiltersRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearFiltersRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearFiltersRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearFiltersRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/add/add_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/add/add_post_request_body.py new file mode 100644 index 00000000000..10f4d0b224c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/add/add_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .............models.json import Json + +@dataclass +class AddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The index property + index: Optional[int] = None + # The name property + name: Optional[str] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .............models.json import Json + + from .............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "index": lambda n : setattr(self, 'index', n.get_int_value()), + "name": lambda n : setattr(self, 'name', n.get_str_value()), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("index", self.index) + writer.write_str_value("name", self.name) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/add/add_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/add/add_request_builder.py new file mode 100644 index 00000000000..f14c1e2093c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/add/add_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_table_column import WorkbookTableColumn + from .add_post_request_body import AddPostRequestBody + +class AddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the add method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/add", path_parameters) + + async def post(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Adds a new column to the table. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumncollection-add?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + def to_post_request_information(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Adds a new column to the table. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/columns_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/columns_request_builder.py new file mode 100644 index 00000000000..d6bc306f3dd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/columns_request_builder.py @@ -0,0 +1,230 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_table_column import WorkbookTableColumn + from ............models.workbook_table_column_collection_response import WorkbookTableColumnCollectionResponse + from .add.add_request_builder import AddRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_table_column_item_request_builder import WorkbookTableColumnItemRequestBuilder + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_table_column_id(self,workbook_table_column_id: str) -> WorkbookTableColumnItemRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + param workbook_table_column_id: The unique identifier of workbookTableColumn + Returns: WorkbookTableColumnItemRequestBuilder + """ + if not workbook_table_column_id: + raise TypeError("workbook_table_column_id cannot be null.") + from .item.workbook_table_column_item_request_builder import WorkbookTableColumnItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookTableColumn%2Did"] = workbook_table_column_id + return WorkbookTableColumnItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableColumnCollectionResponse]: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumnCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_column_collection_response import WorkbookTableColumnCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookTableColumnCollectionResponse, error_mapping) + + def item_at_with_index(self,index: int) -> ItemAtWithIndexRequestBuilder: + """ + Provides operations to call the itemAt method. + param index: Usage: index={index} + Returns: ItemAtWithIndexRequestBuilder + """ + if not index: + raise TypeError("index cannot be null.") + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + + return ItemAtWithIndexRequestBuilder(self.request_adapter, self.path_parameters, index) + + async def post(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnsRequestBuilder(self.request_adapter, raw_url) + + @property + def add(self) -> AddRequestBuilder: + """ + Provides operations to call the add method. + """ + from .add.add_request_builder import AddRequestBuilder + + return AddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to call the count method. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ColumnsRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the columns in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/count/count_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/count/count_get_response.py new file mode 100644 index 00000000000..adc36fe76ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/count/count_request_builder.py new file mode 100644 index 00000000000..d2fe9882567 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/count/count_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .count_get_response import CountGetResponse + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the count method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/count()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CountGetResponse]: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CountGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .count_get_response import CountGetResponse + + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/data_body_range/data_body_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/data_body_range/data_body_range_request_builder.py new file mode 100644 index 00000000000..17b90f7dc88 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/data_body_range/data_body_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class DataBodyRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dataBodyRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataBodyRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the data body of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-databodyrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the data body of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DataBodyRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataBodyRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataBodyRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply/apply_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply/apply_post_request_body.py new file mode 100644 index 00000000000..e8afc5734fd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply/apply_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...............models.workbook_filter_criteria import WorkbookFilterCriteria + +@dataclass +class ApplyPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[WorkbookFilterCriteria] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...............models.workbook_filter_criteria import WorkbookFilterCriteria + + from ...............models.workbook_filter_criteria import WorkbookFilterCriteria + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(WorkbookFilterCriteria)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply/apply_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply/apply_request_builder.py new file mode 100644 index 00000000000..77c6d9620f6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply/apply_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_post_request_body import ApplyPostRequestBody + +class ApplyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the apply method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/apply", path_parameters) + + async def post(self,body: ApplyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Apply the given filter criteria on the given column. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/filter-apply?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Apply the given filter criteria on the given column. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_post_request_body.py new file mode 100644 index 00000000000..91ce961da97 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyBottomItemsFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The count property + count: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyBottomItemsFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyBottomItemsFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyBottomItemsFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "count": lambda n : setattr(self, 'count', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("count", self.count) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py new file mode 100644 index 00000000000..1a9c13f61f6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_bottom_items_filter_post_request_body import ApplyBottomItemsFilterPostRequestBody + +class ApplyBottomItemsFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyBottomItemsFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyBottomItemsFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyBottomItemsFilter", path_parameters) + + async def post(self,body: ApplyBottomItemsFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyBottomItemsFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyBottomItemsFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyBottomItemsFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyBottomItemsFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyBottomItemsFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyBottomItemsFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyBottomItemsFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_post_request_body.py new file mode 100644 index 00000000000..d6494d7d508 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyBottomPercentFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The percent property + percent: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyBottomPercentFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyBottomPercentFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyBottomPercentFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "percent": lambda n : setattr(self, 'percent', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("percent", self.percent) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py new file mode 100644 index 00000000000..504a1b1e843 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_bottom_percent_filter_post_request_body import ApplyBottomPercentFilterPostRequestBody + +class ApplyBottomPercentFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyBottomPercentFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyBottomPercentFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyBottomPercentFilter", path_parameters) + + async def post(self,body: ApplyBottomPercentFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyBottomPercentFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyBottomPercentFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyBottomPercentFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyBottomPercentFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyBottomPercentFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyBottomPercentFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyBottomPercentFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_post_request_body.py new file mode 100644 index 00000000000..8c07590af34 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyCellColorFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The color property + color: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyCellColorFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyCellColorFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyCellColorFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "color": lambda n : setattr(self, 'color', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("color", self.color) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py new file mode 100644 index 00000000000..3127a50beba --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_cell_color_filter_post_request_body import ApplyCellColorFilterPostRequestBody + +class ApplyCellColorFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyCellColorFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyCellColorFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyCellColorFilter", path_parameters) + + async def post(self,body: ApplyCellColorFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyCellColorFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyCellColorFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyCellColorFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyCellColorFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyCellColorFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyCellColorFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyCellColorFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_post_request_body.py new file mode 100644 index 00000000000..cc968ec264b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_post_request_body.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyCustomFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria1 property + criteria1: Optional[str] = None + # The criteria2 property + criteria2: Optional[str] = None + # The oper property + oper: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyCustomFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyCustomFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyCustomFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "criteria1": lambda n : setattr(self, 'criteria1', n.get_str_value()), + "criteria2": lambda n : setattr(self, 'criteria2', n.get_str_value()), + "oper": lambda n : setattr(self, 'oper', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("criteria1", self.criteria1) + writer.write_str_value("criteria2", self.criteria2) + writer.write_str_value("oper", self.oper) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py new file mode 100644 index 00000000000..90c29cfecff --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_custom_filter_post_request_body import ApplyCustomFilterPostRequestBody + +class ApplyCustomFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyCustomFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyCustomFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyCustomFilter", path_parameters) + + async def post(self,body: ApplyCustomFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyCustomFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyCustomFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyCustomFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyCustomFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyCustomFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyCustomFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyCustomFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_post_request_body.py new file mode 100644 index 00000000000..f38941f61dc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyDynamicFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyDynamicFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyDynamicFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyDynamicFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("criteria", self.criteria) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py new file mode 100644 index 00000000000..4590eefb0eb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_dynamic_filter_post_request_body import ApplyDynamicFilterPostRequestBody + +class ApplyDynamicFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyDynamicFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyDynamicFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyDynamicFilter", path_parameters) + + async def post(self,body: ApplyDynamicFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyDynamicFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyDynamicFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyDynamicFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyDynamicFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyDynamicFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyDynamicFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyDynamicFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_post_request_body.py new file mode 100644 index 00000000000..b2f933d6f67 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyFontColorFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The color property + color: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyFontColorFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyFontColorFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyFontColorFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "color": lambda n : setattr(self, 'color', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("color", self.color) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py new file mode 100644 index 00000000000..ff43a7b4d0c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_font_color_filter_post_request_body import ApplyFontColorFilterPostRequestBody + +class ApplyFontColorFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyFontColorFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyFontColorFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyFontColorFilter", path_parameters) + + async def post(self,body: ApplyFontColorFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyFontColorFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyFontColorFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyFontColorFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyFontColorFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyFontColorFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyFontColorFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyFontColorFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_post_request_body.py new file mode 100644 index 00000000000..6e78d7776ca --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...............models.workbook_icon import WorkbookIcon + +@dataclass +class ApplyIconFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The icon property + icon: Optional[WorkbookIcon] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyIconFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyIconFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyIconFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...............models.workbook_icon import WorkbookIcon + + from ...............models.workbook_icon import WorkbookIcon + + fields: Dict[str, Callable[[Any], None]] = { + "icon": lambda n : setattr(self, 'icon', n.get_object_value(WorkbookIcon)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("icon", self.icon) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py new file mode 100644 index 00000000000..ac870285ce9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_icon_filter_post_request_body import ApplyIconFilterPostRequestBody + +class ApplyIconFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyIconFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyIconFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyIconFilter", path_parameters) + + async def post(self,body: ApplyIconFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyIconFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyIconFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyIconFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyIconFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyIconFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyIconFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyIconFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_post_request_body.py new file mode 100644 index 00000000000..c60a50f3408 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyTopItemsFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The count property + count: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyTopItemsFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyTopItemsFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyTopItemsFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "count": lambda n : setattr(self, 'count', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("count", self.count) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py new file mode 100644 index 00000000000..375ff61b103 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_top_items_filter_post_request_body import ApplyTopItemsFilterPostRequestBody + +class ApplyTopItemsFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyTopItemsFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyTopItemsFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyTopItemsFilter", path_parameters) + + async def post(self,body: ApplyTopItemsFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyTopItemsFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyTopItemsFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyTopItemsFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyTopItemsFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyTopItemsFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyTopItemsFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyTopItemsFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_post_request_body.py new file mode 100644 index 00000000000..e30d99da2a9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyTopPercentFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The percent property + percent: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyTopPercentFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyTopPercentFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyTopPercentFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "percent": lambda n : setattr(self, 'percent', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("percent", self.percent) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py new file mode 100644 index 00000000000..a05539f5305 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_top_percent_filter_post_request_body import ApplyTopPercentFilterPostRequestBody + +class ApplyTopPercentFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyTopPercentFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyTopPercentFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyTopPercentFilter", path_parameters) + + async def post(self,body: ApplyTopPercentFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyTopPercentFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyTopPercentFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyTopPercentFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyTopPercentFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyTopPercentFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyTopPercentFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyTopPercentFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_post_request_body.py new file mode 100644 index 00000000000..60fc3a49f8e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...............models.json import Json + +@dataclass +class ApplyValuesFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyValuesFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyValuesFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyValuesFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...............models.json import Json + + from ...............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py new file mode 100644 index 00000000000..422a8eb492f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_values_filter_post_request_body import ApplyValuesFilterPostRequestBody + +class ApplyValuesFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyValuesFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyValuesFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyValuesFilter", path_parameters) + + async def post(self,body: ApplyValuesFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyValuesFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyValuesFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyValuesFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyValuesFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyValuesFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyValuesFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyValuesFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/clear/clear_request_builder.py new file mode 100644 index 00000000000..c3220464f87 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the filter on the given column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/filter-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the filter on the given column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/filter_request_builder.py new file mode 100644 index 00000000000..b1084c14291 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/filter/filter_request_builder.py @@ -0,0 +1,307 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_filter import WorkbookFilter + from .apply.apply_request_builder import ApplyRequestBuilder + from .apply_bottom_items_filter.apply_bottom_items_filter_request_builder import ApplyBottomItemsFilterRequestBuilder + from .apply_bottom_percent_filter.apply_bottom_percent_filter_request_builder import ApplyBottomPercentFilterRequestBuilder + from .apply_cell_color_filter.apply_cell_color_filter_request_builder import ApplyCellColorFilterRequestBuilder + from .apply_custom_filter.apply_custom_filter_request_builder import ApplyCustomFilterRequestBuilder + from .apply_dynamic_filter.apply_dynamic_filter_request_builder import ApplyDynamicFilterRequestBuilder + from .apply_font_color_filter.apply_font_color_filter_request_builder import ApplyFontColorFilterRequestBuilder + from .apply_icon_filter.apply_icon_filter_request_builder import ApplyIconFilterRequestBuilder + from .apply_top_items_filter.apply_top_items_filter_request_builder import ApplyTopItemsFilterRequestBuilder + from .apply_top_percent_filter.apply_top_percent_filter_request_builder import ApplyTopPercentFilterRequestBuilder + from .apply_values_filter.apply_values_filter_request_builder import ApplyValuesFilterRequestBuilder + from .clear.clear_request_builder import ClearRequestBuilder + +class FilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the filter property of the microsoft.graph.workbookTableColumn entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property filter for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FilterRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookFilter]: + """ + Retrieve the filter applied to the column. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFilter] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_filter import WorkbookFilter + + return await self.request_adapter.send_async(request_info, WorkbookFilter, error_mapping) + + async def patch(self,body: WorkbookFilter, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFilter]: + """ + Update the navigation property filter in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFilter] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_filter import WorkbookFilter + + return await self.request_adapter.send_async(request_info, WorkbookFilter, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property filter for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FilterRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Retrieve the filter applied to the column. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookFilter, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property filter in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilterRequestBuilder(self.request_adapter, raw_url) + + @property + def apply(self) -> ApplyRequestBuilder: + """ + Provides operations to call the apply method. + """ + from .apply.apply_request_builder import ApplyRequestBuilder + + return ApplyRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_bottom_items_filter(self) -> ApplyBottomItemsFilterRequestBuilder: + """ + Provides operations to call the applyBottomItemsFilter method. + """ + from .apply_bottom_items_filter.apply_bottom_items_filter_request_builder import ApplyBottomItemsFilterRequestBuilder + + return ApplyBottomItemsFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_bottom_percent_filter(self) -> ApplyBottomPercentFilterRequestBuilder: + """ + Provides operations to call the applyBottomPercentFilter method. + """ + from .apply_bottom_percent_filter.apply_bottom_percent_filter_request_builder import ApplyBottomPercentFilterRequestBuilder + + return ApplyBottomPercentFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_cell_color_filter(self) -> ApplyCellColorFilterRequestBuilder: + """ + Provides operations to call the applyCellColorFilter method. + """ + from .apply_cell_color_filter.apply_cell_color_filter_request_builder import ApplyCellColorFilterRequestBuilder + + return ApplyCellColorFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_custom_filter(self) -> ApplyCustomFilterRequestBuilder: + """ + Provides operations to call the applyCustomFilter method. + """ + from .apply_custom_filter.apply_custom_filter_request_builder import ApplyCustomFilterRequestBuilder + + return ApplyCustomFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_dynamic_filter(self) -> ApplyDynamicFilterRequestBuilder: + """ + Provides operations to call the applyDynamicFilter method. + """ + from .apply_dynamic_filter.apply_dynamic_filter_request_builder import ApplyDynamicFilterRequestBuilder + + return ApplyDynamicFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_font_color_filter(self) -> ApplyFontColorFilterRequestBuilder: + """ + Provides operations to call the applyFontColorFilter method. + """ + from .apply_font_color_filter.apply_font_color_filter_request_builder import ApplyFontColorFilterRequestBuilder + + return ApplyFontColorFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_icon_filter(self) -> ApplyIconFilterRequestBuilder: + """ + Provides operations to call the applyIconFilter method. + """ + from .apply_icon_filter.apply_icon_filter_request_builder import ApplyIconFilterRequestBuilder + + return ApplyIconFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_top_items_filter(self) -> ApplyTopItemsFilterRequestBuilder: + """ + Provides operations to call the applyTopItemsFilter method. + """ + from .apply_top_items_filter.apply_top_items_filter_request_builder import ApplyTopItemsFilterRequestBuilder + + return ApplyTopItemsFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_top_percent_filter(self) -> ApplyTopPercentFilterRequestBuilder: + """ + Provides operations to call the applyTopPercentFilter method. + """ + from .apply_top_percent_filter.apply_top_percent_filter_request_builder import ApplyTopPercentFilterRequestBuilder + + return ApplyTopPercentFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_values_filter(self) -> ApplyValuesFilterRequestBuilder: + """ + Provides operations to call the applyValuesFilter method. + """ + from .apply_values_filter.apply_values_filter_request_builder import ApplyValuesFilterRequestBuilder + + return ApplyValuesFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilterRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FilterRequestBuilderGetQueryParameters(): + """ + Retrieve the filter applied to the column. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FilterRequestBuilderGetRequestConfiguration(RequestConfiguration[FilterRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FilterRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/header_row_range/header_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/header_row_range/header_row_range_request_builder.py new file mode 100644 index 00000000000..87a1a6ce561 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/header_row_range/header_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class HeaderRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the headerRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HeaderRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the header row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-headerrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the header row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> HeaderRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HeaderRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HeaderRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/range/range_request_builder.py new file mode 100644 index 00000000000..397151b4033 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/range/range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the entire column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-range?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the entire column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/total_row_range/total_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/total_row_range/total_row_range_request_builder.py new file mode 100644 index 00000000000..bf4d7370173 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/total_row_range/total_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class TotalRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the totalRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TotalRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the totals row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-totalrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the totals row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TotalRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TotalRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TotalRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/workbook_table_column_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/workbook_table_column_item_request_builder.py new file mode 100644 index 00000000000..a92fe70b109 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item/workbook_table_column_item_request_builder.py @@ -0,0 +1,237 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_table_column import WorkbookTableColumn + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + from .filter.filter_request_builder import FilterRequestBuilder + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + from .range.range_request_builder import RangeRequestBuilder + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + +class WorkbookTableColumnItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookTableColumnItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property columns for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookTableColumnItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + async def patch(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Update the navigation property columns in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property columns for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookTableColumnItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property columns in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookTableColumnItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookTableColumnItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookTableColumnItemRequestBuilder(self.request_adapter, raw_url) + + @property + def data_body_range(self) -> DataBodyRangeRequestBuilder: + """ + Provides operations to call the dataBodyRange method. + """ + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + + return DataBodyRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def filter(self) -> FilterRequestBuilder: + """ + Provides operations to manage the filter property of the microsoft.graph.workbookTableColumn entity. + """ + from .filter.filter_request_builder import FilterRequestBuilder + + return FilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def header_row_range(self) -> HeaderRowRangeRequestBuilder: + """ + Provides operations to call the headerRowRange method. + """ + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + + return HeaderRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def total_row_range(self) -> TotalRowRangeRequestBuilder: + """ + Provides operations to call the totalRowRange method. + """ + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + + return TotalRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookTableColumnItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableColumnItemRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the columns in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookTableColumnItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookTableColumnItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableColumnItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py new file mode 100644 index 00000000000..7ddcd343b07 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class DataBodyRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dataBodyRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataBodyRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the data body of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-databodyrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the data body of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DataBodyRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataBodyRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataBodyRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/filter/filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/filter/filter_request_builder.py new file mode 100644 index 00000000000..2e6dff281d0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/filter/filter_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_filter import WorkbookFilter + +class FilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the filter property of the microsoft.graph.workbookTableColumn entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})/filter{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property filter for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FilterRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookFilter]: + """ + Retrieve the filter applied to the column. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFilter] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_filter import WorkbookFilter + + return await self.request_adapter.send_async(request_info, WorkbookFilter, error_mapping) + + async def patch(self,body: WorkbookFilter, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFilter]: + """ + Update the navigation property filter in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFilter] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_filter import WorkbookFilter + + return await self.request_adapter.send_async(request_info, WorkbookFilter, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property filter for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FilterRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Retrieve the filter applied to the column. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookFilter, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property filter in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FilterRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FilterRequestBuilderGetQueryParameters(): + """ + Retrieve the filter applied to the column. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FilterRequestBuilderGetRequestConfiguration(RequestConfiguration[FilterRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FilterRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py new file mode 100644 index 00000000000..06d4ad26e41 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class HeaderRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the headerRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HeaderRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the header row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-headerrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the header row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> HeaderRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HeaderRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HeaderRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py new file mode 100644 index 00000000000..1a37a175484 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py @@ -0,0 +1,134 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_table_column import WorkbookTableColumn + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + from .filter.filter_request_builder import FilterRequestBuilder + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + from .range.range_request_builder import RangeRequestBuilder + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + +class ItemAtWithIndexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the itemAt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], index: Optional[int] = None) -> None: + """ + Instantiates a new ItemAtWithIndexRequestBuilder and sets the default values. + param index: Usage: index={index} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Gets a column based on its position in the collection. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumncollection-itemat?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets a column based on its position in the collection. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ItemAtWithIndexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemAtWithIndexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemAtWithIndexRequestBuilder(self.request_adapter, raw_url) + + @property + def data_body_range(self) -> DataBodyRangeRequestBuilder: + """ + Provides operations to call the dataBodyRange method. + """ + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + + return DataBodyRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def filter(self) -> FilterRequestBuilder: + """ + Provides operations to manage the filter property of the microsoft.graph.workbookTableColumn entity. + """ + from .filter.filter_request_builder import FilterRequestBuilder + + return FilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def header_row_range(self) -> HeaderRowRangeRequestBuilder: + """ + Provides operations to call the headerRowRange method. + """ + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + + return HeaderRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def total_row_range(self) -> TotalRowRangeRequestBuilder: + """ + Provides operations to call the totalRowRange method. + """ + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + + return TotalRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemAtWithIndexRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..4753071d91a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/range/range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the entire column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-range?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the entire column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py new file mode 100644 index 00000000000..7c9361d076b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class TotalRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the totalRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TotalRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/columns/itemAt(index={index})/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the totals row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-totalrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the totals row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TotalRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TotalRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TotalRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/convert_to_range/convert_to_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/convert_to_range/convert_to_range_request_builder.py new file mode 100644 index 00000000000..e2ace923dce --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/convert_to_range/convert_to_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class ConvertToRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the convertToRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ConvertToRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/convertToRange", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Converts the table into a normal range of cells. All data is preserved. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-converttorange?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Converts the table into a normal range of cells. All data is preserved. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ConvertToRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ConvertToRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ConvertToRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ConvertToRangeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/data_body_range/data_body_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/data_body_range/data_body_range_request_builder.py new file mode 100644 index 00000000000..a5d1aa572b1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/data_body_range/data_body_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class DataBodyRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dataBodyRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataBodyRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the data body of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-databodyrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the data body of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DataBodyRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataBodyRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataBodyRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/header_row_range/header_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/header_row_range/header_row_range_request_builder.py new file mode 100644 index 00000000000..1e709e99a61 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/header_row_range/header_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class HeaderRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the headerRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HeaderRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with header row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-headerrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with header row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> HeaderRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HeaderRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HeaderRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/range/range_request_builder.py new file mode 100644 index 00000000000..2a330a085f0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/range/range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Get the range object associated with the entire table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-range?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Get the range object associated with the entire table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/reapply_filters/reapply_filters_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/reapply_filters/reapply_filters_request_builder.py new file mode 100644 index 00000000000..03b23d6b259 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/reapply_filters/reapply_filters_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + +class ReapplyFiltersRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the reapplyFilters method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReapplyFiltersRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/reapplyFilters", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Reapplies all the filters currently on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/table-reapplyfilters?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Reapplies all the filters currently on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ReapplyFiltersRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReapplyFiltersRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReapplyFiltersRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReapplyFiltersRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/add/add_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/add/add_post_request_body.py new file mode 100644 index 00000000000..d6402993711 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/add/add_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .............models.json import Json + +@dataclass +class AddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The index property + index: Optional[int] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .............models.json import Json + + from .............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "index": lambda n : setattr(self, 'index', n.get_int_value()), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("index", self.index) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/add/add_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/add/add_request_builder.py new file mode 100644 index 00000000000..1fe128fa38e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/add/add_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_table_row import WorkbookTableRow + from .add_post_request_body import AddPostRequestBody + +class AddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the add method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/rows/add", path_parameters) + + async def post(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + Find more info here: https://learn.microsoft.com/graph/api/tablerowcollection-add?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_post_request_information(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/count/count_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/count/count_get_response.py new file mode 100644 index 00000000000..adc36fe76ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/count/count_request_builder.py new file mode 100644 index 00000000000..4ad3e9044d6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/count/count_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .count_get_response import CountGetResponse + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the count method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/rows/count()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CountGetResponse]: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CountGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .count_get_response import CountGetResponse + + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item/range/range_request_builder.py new file mode 100644 index 00000000000..bf9ea002f03 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item/range/range_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/rows/{workbookTableRow%2Did}/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item/workbook_table_row_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item/workbook_table_row_item_request_builder.py new file mode 100644 index 00000000000..ff2e7a1c81b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item/workbook_table_row_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_table_row import WorkbookTableRow + from .range.range_request_builder import RangeRequestBuilder + +class WorkbookTableRowItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookTableRowItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/rows/{workbookTableRow%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property rows for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookTableRowItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + async def patch(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Update the navigation property rows in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property rows for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookTableRowItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property rows in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookTableRowItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookTableRowItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookTableRowItemRequestBuilder(self.request_adapter, raw_url) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookTableRowItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableRowItemRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the rows in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookTableRowItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookTableRowItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableRowItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py new file mode 100644 index 00000000000..a9d353db2e3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py @@ -0,0 +1,94 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_table_row import WorkbookTableRow + from .range.range_request_builder import RangeRequestBuilder + +class ItemAtWithIndexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the itemAt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], index: Optional[int] = None) -> None: + """ + Instantiates a new ItemAtWithIndexRequestBuilder and sets the default values. + param index: Usage: index={index} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/rows/itemAt(index={index})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Gets a row based on its position in the collection. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + Find more info here: https://learn.microsoft.com/graph/api/tablerowcollection-itemat?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets a row based on its position in the collection. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ItemAtWithIndexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemAtWithIndexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemAtWithIndexRequestBuilder(self.request_adapter, raw_url) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemAtWithIndexRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item_at_with_index/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..e76c095ba14 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/item_at_with_index/range/range_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/rows/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/rows_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/rows_request_builder.py new file mode 100644 index 00000000000..d274b4083d6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/rows/rows_request_builder.py @@ -0,0 +1,230 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_table_row import WorkbookTableRow + from ............models.workbook_table_row_collection_response import WorkbookTableRowCollectionResponse + from .add.add_request_builder import AddRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_table_row_item_request_builder import WorkbookTableRowItemRequestBuilder + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + +class RowsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RowsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/rows{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_table_row_id(self,workbook_table_row_id: str) -> WorkbookTableRowItemRequestBuilder: + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + param workbook_table_row_id: The unique identifier of workbookTableRow + Returns: WorkbookTableRowItemRequestBuilder + """ + if not workbook_table_row_id: + raise TypeError("workbook_table_row_id cannot be null.") + from .item.workbook_table_row_item_request_builder import WorkbookTableRowItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookTableRow%2Did"] = workbook_table_row_id + return WorkbookTableRowItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[RowsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableRowCollectionResponse]: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRowCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_row_collection_response import WorkbookTableRowCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookTableRowCollectionResponse, error_mapping) + + def item_at_with_index(self,index: int) -> ItemAtWithIndexRequestBuilder: + """ + Provides operations to call the itemAt method. + param index: Usage: index={index} + Returns: ItemAtWithIndexRequestBuilder + """ + if not index: + raise TypeError("index cannot be null.") + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + + return ItemAtWithIndexRequestBuilder(self.request_adapter, self.path_parameters, index) + + async def post(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Create new navigation property to rows for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RowsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to rows for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RowsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RowsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RowsRequestBuilder(self.request_adapter, raw_url) + + @property + def add(self) -> AddRequestBuilder: + """ + Provides operations to call the add method. + """ + from .add.add_request_builder import AddRequestBuilder + + return AddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to call the count method. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class RowsRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the rows in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class RowsRequestBuilderGetRequestConfiguration(RequestConfiguration[RowsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RowsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/apply/apply_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/apply/apply_post_request_body.py new file mode 100644 index 00000000000..21952f48ae7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/apply/apply_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .............models.workbook_sort_field import WorkbookSortField + +@dataclass +class ApplyPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fields property + fields: Optional[List[WorkbookSortField]] = None + # The matchCase property + match_case: Optional[bool] = None + # The method property + method: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .............models.workbook_sort_field import WorkbookSortField + + from .............models.workbook_sort_field import WorkbookSortField + + fields: Dict[str, Callable[[Any], None]] = { + "fields": lambda n : setattr(self, 'fields', n.get_collection_of_object_values(WorkbookSortField)), + "matchCase": lambda n : setattr(self, 'match_case', n.get_bool_value()), + "method": lambda n : setattr(self, 'method', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_collection_of_object_values("fields", self.fields) + writer.write_bool_value("matchCase", self.match_case) + writer.write_str_value("method", self.method) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/apply/apply_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/apply/apply_request_builder.py new file mode 100644 index 00000000000..7ebb4bf7b70 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/apply/apply_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .apply_post_request_body import ApplyPostRequestBody + +class ApplyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the apply method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/sort/apply", path_parameters) + + async def post(self,body: ApplyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Perform a sort operation. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/tablesort-apply?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Perform a sort operation. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/clear/clear_request_builder.py new file mode 100644 index 00000000000..53f471ca05c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/sort/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/tablesort-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/reapply/reapply_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/reapply/reapply_request_builder.py new file mode 100644 index 00000000000..b70b168f236 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/reapply/reapply_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + +class ReapplyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the reapply method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReapplyRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/sort/reapply", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Reapplies the current sorting parameters to the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/tablesort-reapply?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Reapplies the current sorting parameters to the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ReapplyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReapplyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReapplyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReapplyRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/sort_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/sort_request_builder.py new file mode 100644 index 00000000000..07eca324562 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/sort/sort_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_table_sort import WorkbookTableSort + from .apply.apply_request_builder import ApplyRequestBuilder + from .clear.clear_request_builder import ClearRequestBuilder + from .reapply.reapply_request_builder import ReapplyRequestBuilder + +class SortRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sort property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SortRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/sort{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property sort for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[SortRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableSort]: + """ + Represents the sorting for the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableSort] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_sort import WorkbookTableSort + + return await self.request_adapter.send_async(request_info, WorkbookTableSort, error_mapping) + + async def patch(self,body: WorkbookTableSort, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableSort]: + """ + Update the navigation property sort in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableSort] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_sort import WorkbookTableSort + + return await self.request_adapter.send_async(request_info, WorkbookTableSort, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property sort for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SortRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the sorting for the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookTableSort, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property sort in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SortRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SortRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SortRequestBuilder(self.request_adapter, raw_url) + + @property + def apply(self) -> ApplyRequestBuilder: + """ + Provides operations to call the apply method. + """ + from .apply.apply_request_builder import ApplyRequestBuilder + + return ApplyRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def reapply(self) -> ReapplyRequestBuilder: + """ + Provides operations to call the reapply method. + """ + from .reapply.reapply_request_builder import ReapplyRequestBuilder + + return ReapplyRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SortRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SortRequestBuilderGetQueryParameters(): + """ + Represents the sorting for the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class SortRequestBuilderGetRequestConfiguration(RequestConfiguration[SortRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SortRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/total_row_range/total_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/total_row_range/total_row_range_request_builder.py new file mode 100644 index 00000000000..aaf4ada9aa5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/total_row_range/total_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class TotalRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the totalRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TotalRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with totals row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-totalrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with totals row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TotalRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TotalRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TotalRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/workbook_table_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/workbook_table_item_request_builder.py new file mode 100644 index 00000000000..ac7b80c01af --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/workbook_table_item_request_builder.py @@ -0,0 +1,297 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_table import WorkbookTable + from .clear_filters.clear_filters_request_builder import ClearFiltersRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder + from .convert_to_range.convert_to_range_request_builder import ConvertToRangeRequestBuilder + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + from .range.range_request_builder import RangeRequestBuilder + from .reapply_filters.reapply_filters_request_builder import ReapplyFiltersRequestBuilder + from .rows.rows_request_builder import RowsRequestBuilder + from .sort.sort_request_builder import SortRequestBuilder + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + +class WorkbookTableItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the tables property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookTableItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property tables for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookTableItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTable]: + """ + Represents a collection of tables associated with the workbook. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTable] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_table import WorkbookTable + + return await self.request_adapter.send_async(request_info, WorkbookTable, error_mapping) + + async def patch(self,body: WorkbookTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTable]: + """ + Update the navigation property tables in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTable] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_table import WorkbookTable + + return await self.request_adapter.send_async(request_info, WorkbookTable, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property tables for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookTableItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of tables associated with the workbook. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property tables in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookTableItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookTableItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookTableItemRequestBuilder(self.request_adapter, raw_url) + + @property + def clear_filters(self) -> ClearFiltersRequestBuilder: + """ + Provides operations to call the clearFilters method. + """ + from .clear_filters.clear_filters_request_builder import ClearFiltersRequestBuilder + + return ClearFiltersRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + """ + from .columns.columns_request_builder import ColumnsRequestBuilder + + return ColumnsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def convert_to_range(self) -> ConvertToRangeRequestBuilder: + """ + Provides operations to call the convertToRange method. + """ + from .convert_to_range.convert_to_range_request_builder import ConvertToRangeRequestBuilder + + return ConvertToRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def data_body_range(self) -> DataBodyRangeRequestBuilder: + """ + Provides operations to call the dataBodyRange method. + """ + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + + return DataBodyRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def header_row_range(self) -> HeaderRowRangeRequestBuilder: + """ + Provides operations to call the headerRowRange method. + """ + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + + return HeaderRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def reapply_filters(self) -> ReapplyFiltersRequestBuilder: + """ + Provides operations to call the reapplyFilters method. + """ + from .reapply_filters.reapply_filters_request_builder import ReapplyFiltersRequestBuilder + + return ReapplyFiltersRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rows(self) -> RowsRequestBuilder: + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + """ + from .rows.rows_request_builder import RowsRequestBuilder + + return RowsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sort(self) -> SortRequestBuilder: + """ + Provides operations to manage the sort property of the microsoft.graph.workbookTable entity. + """ + from .sort.sort_request_builder import SortRequestBuilder + + return SortRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def total_row_range(self) -> TotalRowRangeRequestBuilder: + """ + Provides operations to call the totalRowRange method. + """ + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + + return TotalRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheet(self) -> WorksheetRequestBuilder: + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookTable entity. + """ + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + + return WorksheetRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookTableItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableItemRequestBuilderGetQueryParameters(): + """ + Represents a collection of tables associated with the workbook. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookTableItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookTableItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/worksheet/worksheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..18633d589f9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item/worksheet/worksheet_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_worksheet import WorkbookWorksheet + +class WorksheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/{workbookTable%2Did}/worksheet{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + The worksheet containing the current table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The worksheet containing the current table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> WorksheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorksheetRequestBuilderGetQueryParameters(): + """ + The worksheet containing the current table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py new file mode 100644 index 00000000000..bee709ca43a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + +class ClearFiltersRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clearFilters method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearFiltersRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/clearFilters", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clears all the filters currently applied on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/table-clearfilters?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clears all the filters currently applied on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearFiltersRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearFiltersRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearFiltersRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearFiltersRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/columns/columns_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/columns/columns_request_builder.py new file mode 100644 index 00000000000..94331a734f6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/columns/columns_request_builder.py @@ -0,0 +1,182 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_table_column import WorkbookTableColumn + from ............models.workbook_table_column_collection_response import WorkbookTableColumnCollectionResponse + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/columns{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableColumnCollectionResponse]: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumnCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_column_collection_response import WorkbookTableColumnCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookTableColumnCollectionResponse, error_mapping) + + async def post(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ColumnsRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the columns in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py new file mode 100644 index 00000000000..7dc4223c27b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class ConvertToRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the convertToRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ConvertToRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/convertToRange", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Converts the table into a normal range of cells. All data is preserved. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-converttorange?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Converts the table into a normal range of cells. All data is preserved. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ConvertToRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ConvertToRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ConvertToRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ConvertToRangeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py new file mode 100644 index 00000000000..56e6d341e04 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class DataBodyRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dataBodyRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataBodyRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the data body of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-databodyrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the data body of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DataBodyRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataBodyRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataBodyRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py new file mode 100644 index 00000000000..aab0a1e3b99 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class HeaderRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the headerRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HeaderRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with header row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-headerrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with header row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> HeaderRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HeaderRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HeaderRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/item_at_with_index_request_builder.py new file mode 100644 index 00000000000..a514618e5aa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/item_at_with_index_request_builder.py @@ -0,0 +1,193 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_table import WorkbookTable + from .clear_filters.clear_filters_request_builder import ClearFiltersRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder + from .convert_to_range.convert_to_range_request_builder import ConvertToRangeRequestBuilder + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + from .range.range_request_builder import RangeRequestBuilder + from .reapply_filters.reapply_filters_request_builder import ReapplyFiltersRequestBuilder + from .rows.rows_request_builder import RowsRequestBuilder + from .sort.sort_request_builder import SortRequestBuilder + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + +class ItemAtWithIndexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the itemAt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], index: Optional[int] = None) -> None: + """ + Instantiates a new ItemAtWithIndexRequestBuilder and sets the default values. + param index: Usage: index={index} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTable]: + """ + Invoke function itemAt + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTable] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_table import WorkbookTable + + return await self.request_adapter.send_async(request_info, WorkbookTable, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function itemAt + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ItemAtWithIndexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemAtWithIndexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemAtWithIndexRequestBuilder(self.request_adapter, raw_url) + + @property + def clear_filters(self) -> ClearFiltersRequestBuilder: + """ + Provides operations to call the clearFilters method. + """ + from .clear_filters.clear_filters_request_builder import ClearFiltersRequestBuilder + + return ClearFiltersRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + """ + from .columns.columns_request_builder import ColumnsRequestBuilder + + return ColumnsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def convert_to_range(self) -> ConvertToRangeRequestBuilder: + """ + Provides operations to call the convertToRange method. + """ + from .convert_to_range.convert_to_range_request_builder import ConvertToRangeRequestBuilder + + return ConvertToRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def data_body_range(self) -> DataBodyRangeRequestBuilder: + """ + Provides operations to call the dataBodyRange method. + """ + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + + return DataBodyRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def header_row_range(self) -> HeaderRowRangeRequestBuilder: + """ + Provides operations to call the headerRowRange method. + """ + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + + return HeaderRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def reapply_filters(self) -> ReapplyFiltersRequestBuilder: + """ + Provides operations to call the reapplyFilters method. + """ + from .reapply_filters.reapply_filters_request_builder import ReapplyFiltersRequestBuilder + + return ReapplyFiltersRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rows(self) -> RowsRequestBuilder: + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + """ + from .rows.rows_request_builder import RowsRequestBuilder + + return RowsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sort(self) -> SortRequestBuilder: + """ + Provides operations to manage the sort property of the microsoft.graph.workbookTable entity. + """ + from .sort.sort_request_builder import SortRequestBuilder + + return SortRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def total_row_range(self) -> TotalRowRangeRequestBuilder: + """ + Provides operations to call the totalRowRange method. + """ + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + + return TotalRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheet(self) -> WorksheetRequestBuilder: + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookTable entity. + """ + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + + return WorksheetRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemAtWithIndexRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..b818a9ca338 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/range/range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Get the range object associated with the entire table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-range?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Get the range object associated with the entire table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py new file mode 100644 index 00000000000..07acc6d7a0c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + +class ReapplyFiltersRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the reapplyFilters method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReapplyFiltersRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/reapplyFilters", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Reapplies all the filters currently on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/table-reapplyfilters?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Reapplies all the filters currently on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ReapplyFiltersRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReapplyFiltersRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReapplyFiltersRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReapplyFiltersRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/rows/rows_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/rows/rows_request_builder.py new file mode 100644 index 00000000000..19306f0133b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/rows/rows_request_builder.py @@ -0,0 +1,182 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_table_row import WorkbookTableRow + from ............models.workbook_table_row_collection_response import WorkbookTableRowCollectionResponse + +class RowsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RowsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/rows{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[RowsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableRowCollectionResponse]: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRowCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_row_collection_response import WorkbookTableRowCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookTableRowCollectionResponse, error_mapping) + + async def post(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Create new navigation property to rows for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RowsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to rows for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RowsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RowsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RowsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RowsRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the rows in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class RowsRequestBuilderGetRequestConfiguration(RequestConfiguration[RowsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RowsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/sort/sort_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/sort/sort_request_builder.py new file mode 100644 index 00000000000..1d7c68106bb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/sort/sort_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_table_sort import WorkbookTableSort + +class SortRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sort property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SortRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/sort{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property sort for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[SortRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableSort]: + """ + Represents the sorting for the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableSort] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_sort import WorkbookTableSort + + return await self.request_adapter.send_async(request_info, WorkbookTableSort, error_mapping) + + async def patch(self,body: WorkbookTableSort, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableSort]: + """ + Update the navigation property sort in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableSort] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_sort import WorkbookTableSort + + return await self.request_adapter.send_async(request_info, WorkbookTableSort, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property sort for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SortRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the sorting for the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookTableSort, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property sort in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SortRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SortRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SortRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SortRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SortRequestBuilderGetQueryParameters(): + """ + Represents the sorting for the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class SortRequestBuilderGetRequestConfiguration(RequestConfiguration[SortRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SortRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py new file mode 100644 index 00000000000..53f06bf7df6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class TotalRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the totalRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TotalRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with totals row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-totalrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with totals row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TotalRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TotalRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TotalRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/worksheet/worksheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..2d409a0bacb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/item_at_with_index/worksheet/worksheet_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_worksheet import WorkbookWorksheet + +class WorksheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables/itemAt(index={index})/worksheet{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + The worksheet containing the current table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The worksheet containing the current table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> WorksheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorksheetRequestBuilderGetQueryParameters(): + """ + The worksheet containing the current table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/tables_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/tables_request_builder.py new file mode 100644 index 00000000000..7141a6454fd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/tables/tables_request_builder.py @@ -0,0 +1,230 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.workbook_table import WorkbookTable + from ..........models.workbook_table_collection_response import WorkbookTableCollectionResponse + from .add.add_request_builder import AddRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_table_item_request_builder import WorkbookTableItemRequestBuilder + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + +class TablesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the tables property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TablesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/tables{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_table_id(self,workbook_table_id: str) -> WorkbookTableItemRequestBuilder: + """ + Provides operations to manage the tables property of the microsoft.graph.workbook entity. + param workbook_table_id: The unique identifier of workbookTable + Returns: WorkbookTableItemRequestBuilder + """ + if not workbook_table_id: + raise TypeError("workbook_table_id cannot be null.") + from .item.workbook_table_item_request_builder import WorkbookTableItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookTable%2Did"] = workbook_table_id + return WorkbookTableItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[TablesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableCollectionResponse]: + """ + Represents a collection of tables associated with the workbook. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_table_collection_response import WorkbookTableCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookTableCollectionResponse, error_mapping) + + def item_at_with_index(self,index: int) -> ItemAtWithIndexRequestBuilder: + """ + Provides operations to call the itemAt method. + param index: Usage: index={index} + Returns: ItemAtWithIndexRequestBuilder + """ + if not index: + raise TypeError("index cannot be null.") + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + + return ItemAtWithIndexRequestBuilder(self.request_adapter, self.path_parameters, index) + + async def post(self,body: WorkbookTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTable]: + """ + Create new navigation property to tables for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTable] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_table import WorkbookTable + + return await self.request_adapter.send_async(request_info, WorkbookTable, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[TablesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of tables associated with the workbook. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to tables for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TablesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TablesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TablesRequestBuilder(self.request_adapter, raw_url) + + @property + def add(self) -> AddRequestBuilder: + """ + Provides operations to call the add method. + """ + from .add.add_request_builder import AddRequestBuilder + + return AddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to call the count method. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class TablesRequestBuilderGetQueryParameters(): + """ + Represents a collection of tables associated with the workbook. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class TablesRequestBuilderGetRequestConfiguration(RequestConfiguration[TablesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TablesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/workbook_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/workbook_request_builder.py new file mode 100644 index 00000000000..ebc613e9ae5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/workbook_request_builder.py @@ -0,0 +1,313 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.workbook import Workbook + from .application.application_request_builder import ApplicationRequestBuilder + from .close_session.close_session_request_builder import CloseSessionRequestBuilder + from .comments.comments_request_builder import CommentsRequestBuilder + from .create_session.create_session_request_builder import CreateSessionRequestBuilder + from .functions.functions_request_builder import FunctionsRequestBuilder + from .names.names_request_builder import NamesRequestBuilder + from .operations.operations_request_builder import OperationsRequestBuilder + from .refresh_session.refresh_session_request_builder import RefreshSessionRequestBuilder + from .session_info_resource_with_key.session_info_resource_with_key_request_builder import SessionInfoResourceWithKeyRequestBuilder + from .tables.tables_request_builder import TablesRequestBuilder + from .table_row_operation_result_with_key.table_row_operation_result_with_key_request_builder import TableRowOperationResultWithKeyRequestBuilder + from .worksheets.worksheets_request_builder import WorksheetsRequestBuilder + +class WorkbookRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the workbook property of the microsoft.graph.driveItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property workbook for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookRequestBuilderGetQueryParameters]] = None) -> Optional[Workbook]: + """ + For files that are Excel spreadsheets, access to the workbook API to work with the spreadsheet's contents. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Workbook] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.workbook import Workbook + + return await self.request_adapter.send_async(request_info, Workbook, error_mapping) + + async def patch(self,body: Workbook, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Workbook]: + """ + Update the navigation property workbook in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Workbook] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.workbook import Workbook + + return await self.request_adapter.send_async(request_info, Workbook, error_mapping) + + def session_info_resource_with_key(self,key: str) -> SessionInfoResourceWithKeyRequestBuilder: + """ + Provides operations to call the sessionInfoResource method. + param key: Usage: key='{key}' + Returns: SessionInfoResourceWithKeyRequestBuilder + """ + if not key: + raise TypeError("key cannot be null.") + from .session_info_resource_with_key.session_info_resource_with_key_request_builder import SessionInfoResourceWithKeyRequestBuilder + + return SessionInfoResourceWithKeyRequestBuilder(self.request_adapter, self.path_parameters, key) + + def table_row_operation_result_with_key(self,key: str) -> TableRowOperationResultWithKeyRequestBuilder: + """ + Provides operations to call the tableRowOperationResult method. + param key: Usage: key='{key}' + Returns: TableRowOperationResultWithKeyRequestBuilder + """ + if not key: + raise TypeError("key cannot be null.") + from .table_row_operation_result_with_key.table_row_operation_result_with_key_request_builder import TableRowOperationResultWithKeyRequestBuilder + + return TableRowOperationResultWithKeyRequestBuilder(self.request_adapter, self.path_parameters, key) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property workbook for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + For files that are Excel spreadsheets, access to the workbook API to work with the spreadsheet's contents. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Workbook, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property workbook in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookRequestBuilder(self.request_adapter, raw_url) + + @property + def application(self) -> ApplicationRequestBuilder: + """ + Provides operations to manage the application property of the microsoft.graph.workbook entity. + """ + from .application.application_request_builder import ApplicationRequestBuilder + + return ApplicationRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def close_session(self) -> CloseSessionRequestBuilder: + """ + Provides operations to call the closeSession method. + """ + from .close_session.close_session_request_builder import CloseSessionRequestBuilder + + return CloseSessionRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def comments(self) -> CommentsRequestBuilder: + """ + Provides operations to manage the comments property of the microsoft.graph.workbook entity. + """ + from .comments.comments_request_builder import CommentsRequestBuilder + + return CommentsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def create_session(self) -> CreateSessionRequestBuilder: + """ + Provides operations to call the createSession method. + """ + from .create_session.create_session_request_builder import CreateSessionRequestBuilder + + return CreateSessionRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def functions(self) -> FunctionsRequestBuilder: + """ + Provides operations to manage the functions property of the microsoft.graph.workbook entity. + """ + from .functions.functions_request_builder import FunctionsRequestBuilder + + return FunctionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def names(self) -> NamesRequestBuilder: + """ + Provides operations to manage the names property of the microsoft.graph.workbook entity. + """ + from .names.names_request_builder import NamesRequestBuilder + + return NamesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def operations(self) -> OperationsRequestBuilder: + """ + Provides operations to manage the operations property of the microsoft.graph.workbook entity. + """ + from .operations.operations_request_builder import OperationsRequestBuilder + + return OperationsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def refresh_session(self) -> RefreshSessionRequestBuilder: + """ + Provides operations to call the refreshSession method. + """ + from .refresh_session.refresh_session_request_builder import RefreshSessionRequestBuilder + + return RefreshSessionRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def tables(self) -> TablesRequestBuilder: + """ + Provides operations to manage the tables property of the microsoft.graph.workbook entity. + """ + from .tables.tables_request_builder import TablesRequestBuilder + + return TablesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheets(self) -> WorksheetsRequestBuilder: + """ + Provides operations to manage the worksheets property of the microsoft.graph.workbook entity. + """ + from .worksheets.worksheets_request_builder import WorksheetsRequestBuilder + + return WorksheetsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookRequestBuilderGetQueryParameters(): + """ + For files that are Excel spreadsheets, access to the workbook API to work with the spreadsheet's contents. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/add/add_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/add/add_post_request_body.py new file mode 100644 index 00000000000..aaaaaf2b06b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/add/add_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class AddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The name property + name: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "name": lambda n : setattr(self, 'name', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("name", self.name) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/add/add_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/add/add_request_builder.py new file mode 100644 index 00000000000..2d8f52dbbec --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/add/add_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_worksheet import WorkbookWorksheet + from .add_post_request_body import AddPostRequestBody + +class AddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the add method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/add", path_parameters) + + async def post(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + Add a new worksheet to the workbook. The worksheet is added at the end of existing worksheets. If you want to activate the newly added worksheet, call .activate() on it. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + Find more info here: https://learn.microsoft.com/graph/api/worksheetcollection-add?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_post_request_information(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Add a new worksheet to the workbook. The worksheet is added at the end of existing worksheets. If you want to activate the newly added worksheet, call .activate() on it. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/count/count_request_builder.py new file mode 100644 index 00000000000..e0c500de88a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/cell_with_row_with_column/cell_with_row_with_column_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/cell_with_row_with_column/cell_with_row_with_column_request_builder.py new file mode 100644 index 00000000000..f3582cead9c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/cell_with_row_with_column/cell_with_row_with_column_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class CellWithRowWithColumnRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the cell method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], column: Optional[int] = None, row: Optional[int] = None) -> None: + """ + Instantiates a new CellWithRowWithColumnRequestBuilder and sets the default values. + param column: Usage: column={column} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param row: Usage: row={row} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['column'] = str(column) + path_parameters['row'] = str(row) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/cell(row={row},column={column})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object containing the single cell based on row and column numbers. The cell can be outside the bounds of its parent range, so long as it's stays within the worksheet grid. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/worksheet-cell?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object containing the single cell based on row and column numbers. The cell can be outside the bounds of its parent range, so long as it's stays within the worksheet grid. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CellWithRowWithColumnRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CellWithRowWithColumnRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CellWithRowWithColumnRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CellWithRowWithColumnRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/add/add_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/add/add_post_request_body.py new file mode 100644 index 00000000000..dc85c1a1f84 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/add/add_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .............models.json import Json + +@dataclass +class AddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The seriesBy property + series_by: Optional[str] = None + # The sourceData property + source_data: Optional[Json] = None + # The type property + type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .............models.json import Json + + from .............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "seriesBy": lambda n : setattr(self, 'series_by', n.get_str_value()), + "sourceData": lambda n : setattr(self, 'source_data', n.get_object_value(Json)), + "type": lambda n : setattr(self, 'type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("seriesBy", self.series_by) + writer.write_object_value("sourceData", self.source_data) + writer.write_str_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/add/add_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/add/add_request_builder.py new file mode 100644 index 00000000000..6e827244d4d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/add/add_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_chart import WorkbookChart + from .add_post_request_body import AddPostRequestBody + +class AddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the add method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/add", path_parameters) + + async def post(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChart]: + """ + Creates a new chart. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChart] + Find more info here: https://learn.microsoft.com/graph/api/chartcollection-add?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_chart import WorkbookChart + + return await self.request_adapter.send_async(request_info, WorkbookChart, error_mapping) + + def to_post_request_information(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Creates a new chart. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/charts_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/charts_request_builder.py new file mode 100644 index 00000000000..2cc5cea66fe --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/charts_request_builder.py @@ -0,0 +1,243 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_chart import WorkbookChart + from ............models.workbook_chart_collection_response import WorkbookChartCollectionResponse + from .add.add_request_builder import AddRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_chart_item_request_builder import WorkbookChartItemRequestBuilder + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + from .item_with_name.item_with_name_request_builder import ItemWithNameRequestBuilder + +class ChartsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the charts property of the microsoft.graph.workbookWorksheet entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ChartsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_chart_id(self,workbook_chart_id: str) -> WorkbookChartItemRequestBuilder: + """ + Provides operations to manage the charts property of the microsoft.graph.workbookWorksheet entity. + param workbook_chart_id: The unique identifier of workbookChart + Returns: WorkbookChartItemRequestBuilder + """ + if not workbook_chart_id: + raise TypeError("workbook_chart_id cannot be null.") + from .item.workbook_chart_item_request_builder import WorkbookChartItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookChart%2Did"] = workbook_chart_id + return WorkbookChartItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ChartsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartCollectionResponse]: + """ + Returns collection of charts that are part of the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_chart_collection_response import WorkbookChartCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookChartCollectionResponse, error_mapping) + + def item_at_with_index(self,index: int) -> ItemAtWithIndexRequestBuilder: + """ + Provides operations to call the itemAt method. + param index: Usage: index={index} + Returns: ItemAtWithIndexRequestBuilder + """ + if not index: + raise TypeError("index cannot be null.") + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + + return ItemAtWithIndexRequestBuilder(self.request_adapter, self.path_parameters, index) + + def item_with_name(self,name: str) -> ItemWithNameRequestBuilder: + """ + Provides operations to call the item method. + param name: Usage: name='{name}' + Returns: ItemWithNameRequestBuilder + """ + if not name: + raise TypeError("name cannot be null.") + from .item_with_name.item_with_name_request_builder import ItemWithNameRequestBuilder + + return ItemWithNameRequestBuilder(self.request_adapter, self.path_parameters, name) + + async def post(self,body: WorkbookChart, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChart]: + """ + Create new navigation property to charts for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChart] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_chart import WorkbookChart + + return await self.request_adapter.send_async(request_info, WorkbookChart, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ChartsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns collection of charts that are part of the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookChart, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to charts for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ChartsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ChartsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ChartsRequestBuilder(self.request_adapter, raw_url) + + @property + def add(self) -> AddRequestBuilder: + """ + Provides operations to call the add method. + """ + from .add.add_request_builder import AddRequestBuilder + + return AddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to call the count method. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ChartsRequestBuilderGetQueryParameters(): + """ + Returns collection of charts that are part of the worksheet. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ChartsRequestBuilderGetRequestConfiguration(RequestConfiguration[ChartsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ChartsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/count/count_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/count/count_get_response.py new file mode 100644 index 00000000000..adc36fe76ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/count/count_request_builder.py new file mode 100644 index 00000000000..f666989b553 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/count/count_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .count_get_response import CountGetResponse + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the count method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/count()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CountGetResponse]: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CountGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .count_get_response import CountGetResponse + + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/axes_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/axes_request_builder.py new file mode 100644 index 00000000000..69269fb7f78 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/axes_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_axes import WorkbookChartAxes + from .category_axis.category_axis_request_builder import CategoryAxisRequestBuilder + from .series_axis.series_axis_request_builder import SeriesAxisRequestBuilder + from .value_axis.value_axis_request_builder import ValueAxisRequestBuilder + +class AxesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the axes property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AxesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property axes for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[AxesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxes]: + """ + Represents chart axes. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxes] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_axes import WorkbookChartAxes + + return await self.request_adapter.send_async(request_info, WorkbookChartAxes, error_mapping) + + async def patch(self,body: WorkbookChartAxes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxes]: + """ + Update the navigation property axes in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxes] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_axes import WorkbookChartAxes + + return await self.request_adapter.send_async(request_info, WorkbookChartAxes, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property axes for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AxesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart axes. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property axes in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AxesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AxesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AxesRequestBuilder(self.request_adapter, raw_url) + + @property + def category_axis(self) -> CategoryAxisRequestBuilder: + """ + Provides operations to manage the categoryAxis property of the microsoft.graph.workbookChartAxes entity. + """ + from .category_axis.category_axis_request_builder import CategoryAxisRequestBuilder + + return CategoryAxisRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def series_axis(self) -> SeriesAxisRequestBuilder: + """ + Provides operations to manage the seriesAxis property of the microsoft.graph.workbookChartAxes entity. + """ + from .series_axis.series_axis_request_builder import SeriesAxisRequestBuilder + + return SeriesAxisRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def value_axis(self) -> ValueAxisRequestBuilder: + """ + Provides operations to manage the valueAxis property of the microsoft.graph.workbookChartAxes entity. + """ + from .value_axis.value_axis_request_builder import ValueAxisRequestBuilder + + return ValueAxisRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class AxesRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AxesRequestBuilderGetQueryParameters(): + """ + Represents chart axes. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class AxesRequestBuilderGetRequestConfiguration(RequestConfiguration[AxesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AxesRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/category_axis_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/category_axis_request_builder.py new file mode 100644 index 00000000000..1c87c772eb4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/category_axis_request_builder.py @@ -0,0 +1,227 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_chart_axis import WorkbookChartAxis + from .format.format_request_builder import FormatRequestBuilder + from .major_gridlines.major_gridlines_request_builder import MajorGridlinesRequestBuilder + from .minor_gridlines.minor_gridlines_request_builder import MinorGridlinesRequestBuilder + from .title.title_request_builder import TitleRequestBuilder + +class CategoryAxisRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the categoryAxis property of the microsoft.graph.workbookChartAxes entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CategoryAxisRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property categoryAxis for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[CategoryAxisRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxis]: + """ + Represents the category axis in a chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxis] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_axis import WorkbookChartAxis + + return await self.request_adapter.send_async(request_info, WorkbookChartAxis, error_mapping) + + async def patch(self,body: WorkbookChartAxis, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxis]: + """ + Update the navigation property categoryAxis in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxis] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_axis import WorkbookChartAxis + + return await self.request_adapter.send_async(request_info, WorkbookChartAxis, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property categoryAxis for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CategoryAxisRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the category axis in a chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxis, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property categoryAxis in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CategoryAxisRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CategoryAxisRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CategoryAxisRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxis entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def major_gridlines(self) -> MajorGridlinesRequestBuilder: + """ + Provides operations to manage the majorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + from .major_gridlines.major_gridlines_request_builder import MajorGridlinesRequestBuilder + + return MajorGridlinesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def minor_gridlines(self) -> MinorGridlinesRequestBuilder: + """ + Provides operations to manage the minorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + from .minor_gridlines.minor_gridlines_request_builder import MinorGridlinesRequestBuilder + + return MinorGridlinesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def title(self) -> TitleRequestBuilder: + """ + Provides operations to manage the title property of the microsoft.graph.workbookChartAxis entity. + """ + from .title.title_request_builder import TitleRequestBuilder + + return TitleRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CategoryAxisRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class CategoryAxisRequestBuilderGetQueryParameters(): + """ + Represents the category axis in a chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class CategoryAxisRequestBuilderGetRequestConfiguration(RequestConfiguration[CategoryAxisRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class CategoryAxisRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/font/font_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/font/font_request_builder.py new file mode 100644 index 00000000000..4b46d89f0ec --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/font/font_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_font import WorkbookChartFont + +class FontRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FontRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/format/font{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + async def patch(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FontRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FontRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FontRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FontRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderGetQueryParameters(): + """ + Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FontRequestBuilderGetRequestConfiguration(RequestConfiguration[FontRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/format_request_builder.py new file mode 100644 index 00000000000..bd683e50ea6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/format_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_axis_format import WorkbookChartAxisFormat + from .font.font_request_builder import FontRequestBuilder + from .line.line_request_builder import LineRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxisFormat]: + """ + Represents the formatting of a chart object, which includes line and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_format import WorkbookChartAxisFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisFormat, error_mapping) + + async def patch(self,body: WorkbookChartAxisFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxisFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_format import WorkbookChartAxisFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of a chart object, which includes line and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxisFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def font(self) -> FontRequestBuilder: + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisFormat entity. + """ + from .font.font_request_builder import FontRequestBuilder + + return FontRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def line(self) -> LineRequestBuilder: + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartAxisFormat entity. + """ + from .line.line_request_builder import LineRequestBuilder + + return LineRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of a chart object, which includes line and font formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/clear/clear_request_builder.py new file mode 100644 index 00000000000..ded851451b9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/format/line/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/line_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/line_request_builder.py new file mode 100644 index 00000000000..5c1f7b83dbe --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/format/line/line_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + from .clear.clear_request_builder import ClearRequestBuilder + +class LineRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartAxisFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LineRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/format/line{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + async def patch(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LineRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LineRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LineRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LineRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderGetQueryParameters(): + """ + Represents chart line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LineRequestBuilderGetRequestConfiguration(RequestConfiguration[LineRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/format_request_builder.py new file mode 100644 index 00000000000..ce665048040 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/format_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + from .line.line_request_builder import LineRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/majorGridlines/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + async def patch(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def line(self) -> LineRequestBuilder: + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + from .line.line_request_builder import LineRequestBuilder + + return LineRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of chart gridlines. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/clear/clear_request_builder.py new file mode 100644 index 00000000000..074bb316e83 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/majorGridlines/format/line/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/line_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/line_request_builder.py new file mode 100644 index 00000000000..15b9881ed3b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/format/line/line_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + from .clear.clear_request_builder import ClearRequestBuilder + +class LineRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LineRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/majorGridlines/format/line{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + async def patch(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LineRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LineRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LineRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LineRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderGetQueryParameters(): + """ + Represents chart line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LineRequestBuilderGetRequestConfiguration(RequestConfiguration[LineRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/major_gridlines_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/major_gridlines_request_builder.py new file mode 100644 index 00000000000..81bdef17ab1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/major_gridlines/major_gridlines_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + from .format.format_request_builder import FormatRequestBuilder + +class MajorGridlinesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the majorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MajorGridlinesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/majorGridlines{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property majorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[MajorGridlinesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + async def patch(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Update the navigation property majorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property majorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MajorGridlinesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property majorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MajorGridlinesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MajorGridlinesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MajorGridlinesRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class MajorGridlinesRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MajorGridlinesRequestBuilderGetQueryParameters(): + """ + Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MajorGridlinesRequestBuilderGetRequestConfiguration(RequestConfiguration[MajorGridlinesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MajorGridlinesRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/format_request_builder.py new file mode 100644 index 00000000000..30c2d30adfb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/format_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + from .line.line_request_builder import LineRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/minorGridlines/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + async def patch(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def line(self) -> LineRequestBuilder: + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + from .line.line_request_builder import LineRequestBuilder + + return LineRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of chart gridlines. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/clear/clear_request_builder.py new file mode 100644 index 00000000000..2350f1a9b00 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/minorGridlines/format/line/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/line_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/line_request_builder.py new file mode 100644 index 00000000000..6b7de417e53 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/format/line/line_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + from .clear.clear_request_builder import ClearRequestBuilder + +class LineRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LineRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/minorGridlines/format/line{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + async def patch(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LineRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LineRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LineRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LineRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderGetQueryParameters(): + """ + Represents chart line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LineRequestBuilderGetRequestConfiguration(RequestConfiguration[LineRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/minor_gridlines_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/minor_gridlines_request_builder.py new file mode 100644 index 00000000000..1d5fddc45e5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/minor_gridlines/minor_gridlines_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + from .format.format_request_builder import FormatRequestBuilder + +class MinorGridlinesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the minorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MinorGridlinesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/minorGridlines{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property minorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[MinorGridlinesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + async def patch(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Update the navigation property minorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property minorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MinorGridlinesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property minorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MinorGridlinesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MinorGridlinesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MinorGridlinesRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class MinorGridlinesRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MinorGridlinesRequestBuilderGetQueryParameters(): + """ + Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MinorGridlinesRequestBuilderGetRequestConfiguration(RequestConfiguration[MinorGridlinesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MinorGridlinesRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/font/font_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/font/font_request_builder.py new file mode 100644 index 00000000000..0d0b3d17952 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/font/font_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_font import WorkbookChartFont + +class FontRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisTitleFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FontRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/title/format/font{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + async def patch(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FontRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FontRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FontRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FontRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderGetQueryParameters(): + """ + Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FontRequestBuilderGetRequestConfiguration(RequestConfiguration[FontRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/format_request_builder.py new file mode 100644 index 00000000000..d6b553ed286 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/format/format_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat + from .font.font_request_builder import FontRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxisTitle entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/title/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxisTitleFormat]: + """ + Represents the formatting of chart axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitleFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitleFormat, error_mapping) + + async def patch(self,body: WorkbookChartAxisTitleFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxisTitleFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitleFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitleFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of chart axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxisTitleFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def font(self) -> FontRequestBuilder: + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisTitleFormat entity. + """ + from .font.font_request_builder import FontRequestBuilder + + return FontRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of chart axis title. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/title_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/title_request_builder.py new file mode 100644 index 00000000000..67bed8ec355 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/category_axis/title/title_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_axis_title import WorkbookChartAxisTitle + from .format.format_request_builder import FormatRequestBuilder + +class TitleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the title property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TitleRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/categoryAxis/title{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxisTitle]: + """ + Represents the axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitle] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_title import WorkbookChartAxisTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitle, error_mapping) + + async def patch(self,body: WorkbookChartAxisTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxisTitle]: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitle] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_title import WorkbookChartAxisTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitle, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxisTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TitleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TitleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TitleRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxisTitle entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class TitleRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderGetQueryParameters(): + """ + Represents the axis title. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class TitleRequestBuilderGetRequestConfiguration(RequestConfiguration[TitleRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/font/font_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/font/font_request_builder.py new file mode 100644 index 00000000000..edec40a5113 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/font/font_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_font import WorkbookChartFont + +class FontRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FontRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/format/font{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + async def patch(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FontRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FontRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FontRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FontRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderGetQueryParameters(): + """ + Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FontRequestBuilderGetRequestConfiguration(RequestConfiguration[FontRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/format_request_builder.py new file mode 100644 index 00000000000..e4e1d55258e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/format_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_axis_format import WorkbookChartAxisFormat + from .font.font_request_builder import FontRequestBuilder + from .line.line_request_builder import LineRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxisFormat]: + """ + Represents the formatting of a chart object, which includes line and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_format import WorkbookChartAxisFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisFormat, error_mapping) + + async def patch(self,body: WorkbookChartAxisFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxisFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_format import WorkbookChartAxisFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of a chart object, which includes line and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxisFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def font(self) -> FontRequestBuilder: + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisFormat entity. + """ + from .font.font_request_builder import FontRequestBuilder + + return FontRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def line(self) -> LineRequestBuilder: + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartAxisFormat entity. + """ + from .line.line_request_builder import LineRequestBuilder + + return LineRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of a chart object, which includes line and font formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/clear/clear_request_builder.py new file mode 100644 index 00000000000..7c17687251b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/format/line/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/line_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/line_request_builder.py new file mode 100644 index 00000000000..718b006d24d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/format/line/line_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + from .clear.clear_request_builder import ClearRequestBuilder + +class LineRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartAxisFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LineRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/format/line{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + async def patch(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LineRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LineRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LineRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LineRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderGetQueryParameters(): + """ + Represents chart line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LineRequestBuilderGetRequestConfiguration(RequestConfiguration[LineRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/format_request_builder.py new file mode 100644 index 00000000000..b4aa6edc0a0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/format_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + from .line.line_request_builder import LineRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/majorGridlines/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + async def patch(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def line(self) -> LineRequestBuilder: + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + from .line.line_request_builder import LineRequestBuilder + + return LineRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of chart gridlines. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/clear/clear_request_builder.py new file mode 100644 index 00000000000..2076331ed9a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/majorGridlines/format/line/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/line_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/line_request_builder.py new file mode 100644 index 00000000000..1957c25a6ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/format/line/line_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + from .clear.clear_request_builder import ClearRequestBuilder + +class LineRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LineRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/majorGridlines/format/line{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + async def patch(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LineRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LineRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LineRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LineRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderGetQueryParameters(): + """ + Represents chart line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LineRequestBuilderGetRequestConfiguration(RequestConfiguration[LineRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/major_gridlines_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/major_gridlines_request_builder.py new file mode 100644 index 00000000000..d89e20bdc7c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/major_gridlines/major_gridlines_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + from .format.format_request_builder import FormatRequestBuilder + +class MajorGridlinesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the majorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MajorGridlinesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/majorGridlines{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property majorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[MajorGridlinesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + async def patch(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Update the navigation property majorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property majorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MajorGridlinesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property majorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MajorGridlinesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MajorGridlinesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MajorGridlinesRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class MajorGridlinesRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MajorGridlinesRequestBuilderGetQueryParameters(): + """ + Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MajorGridlinesRequestBuilderGetRequestConfiguration(RequestConfiguration[MajorGridlinesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MajorGridlinesRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/format_request_builder.py new file mode 100644 index 00000000000..24f3616459b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/format_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + from .line.line_request_builder import LineRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/minorGridlines/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + async def patch(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def line(self) -> LineRequestBuilder: + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + from .line.line_request_builder import LineRequestBuilder + + return LineRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of chart gridlines. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/clear/clear_request_builder.py new file mode 100644 index 00000000000..ff8d9d1487c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/minorGridlines/format/line/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/line_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/line_request_builder.py new file mode 100644 index 00000000000..4588ff0ace9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/format/line/line_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + from .clear.clear_request_builder import ClearRequestBuilder + +class LineRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LineRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/minorGridlines/format/line{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + async def patch(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LineRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LineRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LineRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LineRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderGetQueryParameters(): + """ + Represents chart line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LineRequestBuilderGetRequestConfiguration(RequestConfiguration[LineRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/minor_gridlines_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/minor_gridlines_request_builder.py new file mode 100644 index 00000000000..695ea20711a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/minor_gridlines/minor_gridlines_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + from .format.format_request_builder import FormatRequestBuilder + +class MinorGridlinesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the minorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MinorGridlinesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/minorGridlines{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property minorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[MinorGridlinesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + async def patch(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Update the navigation property minorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property minorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MinorGridlinesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property minorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MinorGridlinesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MinorGridlinesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MinorGridlinesRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class MinorGridlinesRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MinorGridlinesRequestBuilderGetQueryParameters(): + """ + Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MinorGridlinesRequestBuilderGetRequestConfiguration(RequestConfiguration[MinorGridlinesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MinorGridlinesRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/series_axis_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/series_axis_request_builder.py new file mode 100644 index 00000000000..326d088f81e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/series_axis_request_builder.py @@ -0,0 +1,227 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_chart_axis import WorkbookChartAxis + from .format.format_request_builder import FormatRequestBuilder + from .major_gridlines.major_gridlines_request_builder import MajorGridlinesRequestBuilder + from .minor_gridlines.minor_gridlines_request_builder import MinorGridlinesRequestBuilder + from .title.title_request_builder import TitleRequestBuilder + +class SeriesAxisRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the seriesAxis property of the microsoft.graph.workbookChartAxes entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SeriesAxisRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property seriesAxis for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[SeriesAxisRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxis]: + """ + Represents the series axis of a 3-dimensional chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxis] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_axis import WorkbookChartAxis + + return await self.request_adapter.send_async(request_info, WorkbookChartAxis, error_mapping) + + async def patch(self,body: WorkbookChartAxis, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxis]: + """ + Update the navigation property seriesAxis in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxis] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_axis import WorkbookChartAxis + + return await self.request_adapter.send_async(request_info, WorkbookChartAxis, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property seriesAxis for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SeriesAxisRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the series axis of a 3-dimensional chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxis, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property seriesAxis in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SeriesAxisRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SeriesAxisRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SeriesAxisRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxis entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def major_gridlines(self) -> MajorGridlinesRequestBuilder: + """ + Provides operations to manage the majorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + from .major_gridlines.major_gridlines_request_builder import MajorGridlinesRequestBuilder + + return MajorGridlinesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def minor_gridlines(self) -> MinorGridlinesRequestBuilder: + """ + Provides operations to manage the minorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + from .minor_gridlines.minor_gridlines_request_builder import MinorGridlinesRequestBuilder + + return MinorGridlinesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def title(self) -> TitleRequestBuilder: + """ + Provides operations to manage the title property of the microsoft.graph.workbookChartAxis entity. + """ + from .title.title_request_builder import TitleRequestBuilder + + return TitleRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SeriesAxisRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SeriesAxisRequestBuilderGetQueryParameters(): + """ + Represents the series axis of a 3-dimensional chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class SeriesAxisRequestBuilderGetRequestConfiguration(RequestConfiguration[SeriesAxisRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SeriesAxisRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/font/font_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/font/font_request_builder.py new file mode 100644 index 00000000000..4b28168e008 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/font/font_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_font import WorkbookChartFont + +class FontRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisTitleFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FontRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/title/format/font{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + async def patch(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FontRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FontRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FontRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FontRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderGetQueryParameters(): + """ + Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FontRequestBuilderGetRequestConfiguration(RequestConfiguration[FontRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/format_request_builder.py new file mode 100644 index 00000000000..87d7e1578d2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/format/format_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat + from .font.font_request_builder import FontRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxisTitle entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/title/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxisTitleFormat]: + """ + Represents the formatting of chart axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitleFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitleFormat, error_mapping) + + async def patch(self,body: WorkbookChartAxisTitleFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxisTitleFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitleFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitleFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of chart axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxisTitleFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def font(self) -> FontRequestBuilder: + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisTitleFormat entity. + """ + from .font.font_request_builder import FontRequestBuilder + + return FontRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of chart axis title. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/title_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/title_request_builder.py new file mode 100644 index 00000000000..471beaafab2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/series_axis/title/title_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_axis_title import WorkbookChartAxisTitle + from .format.format_request_builder import FormatRequestBuilder + +class TitleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the title property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TitleRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/seriesAxis/title{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxisTitle]: + """ + Represents the axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitle] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_title import WorkbookChartAxisTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitle, error_mapping) + + async def patch(self,body: WorkbookChartAxisTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxisTitle]: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitle] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_title import WorkbookChartAxisTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitle, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxisTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TitleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TitleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TitleRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxisTitle entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class TitleRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderGetQueryParameters(): + """ + Represents the axis title. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class TitleRequestBuilderGetRequestConfiguration(RequestConfiguration[TitleRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/font/font_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/font/font_request_builder.py new file mode 100644 index 00000000000..2a11289b164 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/font/font_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_font import WorkbookChartFont + +class FontRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FontRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/format/font{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + async def patch(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FontRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FontRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FontRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FontRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderGetQueryParameters(): + """ + Represents the font attributes (font name, font size, color, etc.) for a chart axis element. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FontRequestBuilderGetRequestConfiguration(RequestConfiguration[FontRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/format_request_builder.py new file mode 100644 index 00000000000..20ed34ec990 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/format_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_axis_format import WorkbookChartAxisFormat + from .font.font_request_builder import FontRequestBuilder + from .line.line_request_builder import LineRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxisFormat]: + """ + Represents the formatting of a chart object, which includes line and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_format import WorkbookChartAxisFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisFormat, error_mapping) + + async def patch(self,body: WorkbookChartAxisFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxisFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_format import WorkbookChartAxisFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of a chart object, which includes line and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxisFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def font(self) -> FontRequestBuilder: + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisFormat entity. + """ + from .font.font_request_builder import FontRequestBuilder + + return FontRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def line(self) -> LineRequestBuilder: + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartAxisFormat entity. + """ + from .line.line_request_builder import LineRequestBuilder + + return LineRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of a chart object, which includes line and font formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/clear/clear_request_builder.py new file mode 100644 index 00000000000..35b95a025ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/format/line/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/line_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/line_request_builder.py new file mode 100644 index 00000000000..2c252ebe868 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/format/line/line_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + from .clear.clear_request_builder import ClearRequestBuilder + +class LineRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartAxisFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LineRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/format/line{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + async def patch(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LineRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LineRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LineRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LineRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderGetQueryParameters(): + """ + Represents chart line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LineRequestBuilderGetRequestConfiguration(RequestConfiguration[LineRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/format_request_builder.py new file mode 100644 index 00000000000..2d187d93fa4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/format_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + from .line.line_request_builder import LineRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/majorGridlines/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + async def patch(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def line(self) -> LineRequestBuilder: + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + from .line.line_request_builder import LineRequestBuilder + + return LineRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of chart gridlines. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/clear/clear_request_builder.py new file mode 100644 index 00000000000..8945f3be22c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/majorGridlines/format/line/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/line_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/line_request_builder.py new file mode 100644 index 00000000000..2188a91c856 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/format/line/line_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + from .clear.clear_request_builder import ClearRequestBuilder + +class LineRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LineRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/majorGridlines/format/line{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + async def patch(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LineRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LineRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LineRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LineRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderGetQueryParameters(): + """ + Represents chart line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LineRequestBuilderGetRequestConfiguration(RequestConfiguration[LineRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/major_gridlines_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/major_gridlines_request_builder.py new file mode 100644 index 00000000000..552370592f3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/major_gridlines/major_gridlines_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + from .format.format_request_builder import FormatRequestBuilder + +class MajorGridlinesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the majorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MajorGridlinesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/majorGridlines{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property majorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[MajorGridlinesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + async def patch(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Update the navigation property majorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property majorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MajorGridlinesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property majorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MajorGridlinesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MajorGridlinesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MajorGridlinesRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class MajorGridlinesRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MajorGridlinesRequestBuilderGetQueryParameters(): + """ + Returns a gridlines object that represents the major gridlines for the specified axis. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MajorGridlinesRequestBuilderGetRequestConfiguration(RequestConfiguration[MajorGridlinesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MajorGridlinesRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/format_request_builder.py new file mode 100644 index 00000000000..55b7a1a6c80 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/format_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + from .line.line_request_builder import LineRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/minorGridlines/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + async def patch(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlinesFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlinesFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_gridlines_format import WorkbookChartGridlinesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlinesFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of chart gridlines. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlinesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def line(self) -> LineRequestBuilder: + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + from .line.line_request_builder import LineRequestBuilder + + return LineRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of chart gridlines. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/clear/clear_request_builder.py new file mode 100644 index 00000000000..ff1eb77b3d7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/minorGridlines/format/line/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/line_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/line_request_builder.py new file mode 100644 index 00000000000..21bc99f030b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/format/line/line_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + from .clear.clear_request_builder import ClearRequestBuilder + +class LineRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartGridlinesFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LineRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/minorGridlines/format/line{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + async def patch(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LineRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LineRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LineRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LineRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderGetQueryParameters(): + """ + Represents chart line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LineRequestBuilderGetRequestConfiguration(RequestConfiguration[LineRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/minor_gridlines_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/minor_gridlines_request_builder.py new file mode 100644 index 00000000000..bb05d0432d9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/minor_gridlines/minor_gridlines_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + from .format.format_request_builder import FormatRequestBuilder + +class MinorGridlinesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the minorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MinorGridlinesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/minorGridlines{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property minorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[MinorGridlinesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + async def patch(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartGridlines]: + """ + Update the navigation property minorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartGridlines] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_gridlines import WorkbookChartGridlines + + return await self.request_adapter.send_async(request_info, WorkbookChartGridlines, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property minorGridlines for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MinorGridlinesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartGridlines, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property minorGridlines in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MinorGridlinesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MinorGridlinesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MinorGridlinesRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartGridlines entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class MinorGridlinesRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MinorGridlinesRequestBuilderGetQueryParameters(): + """ + Returns a Gridlines object that represents the minor gridlines for the specified axis. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MinorGridlinesRequestBuilderGetRequestConfiguration(RequestConfiguration[MinorGridlinesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MinorGridlinesRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/font/font_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/font/font_request_builder.py new file mode 100644 index 00000000000..e0442691845 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/font/font_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_font import WorkbookChartFont + +class FontRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisTitleFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FontRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/title/format/font{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + async def patch(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FontRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FontRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FontRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FontRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderGetQueryParameters(): + """ + Represents the font attributes, such as font name, font size, color, etc. of chart axis title object. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FontRequestBuilderGetRequestConfiguration(RequestConfiguration[FontRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/format_request_builder.py new file mode 100644 index 00000000000..da193f95480 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/format/format_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat + from .font.font_request_builder import FontRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxisTitle entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/title/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxisTitleFormat]: + """ + Represents the formatting of chart axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitleFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitleFormat, error_mapping) + + async def patch(self,body: WorkbookChartAxisTitleFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxisTitleFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitleFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_axis_title_format import WorkbookChartAxisTitleFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitleFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of chart axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxisTitleFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def font(self) -> FontRequestBuilder: + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAxisTitleFormat entity. + """ + from .font.font_request_builder import FontRequestBuilder + + return FontRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of chart axis title. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/title_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/title_request_builder.py new file mode 100644 index 00000000000..d0b6631c44b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/title/title_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_axis_title import WorkbookChartAxisTitle + from .format.format_request_builder import FormatRequestBuilder + +class TitleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the title property of the microsoft.graph.workbookChartAxis entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TitleRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis/title{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxisTitle]: + """ + Represents the axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitle] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_title import WorkbookChartAxisTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitle, error_mapping) + + async def patch(self,body: WorkbookChartAxisTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxisTitle]: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxisTitle] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_axis_title import WorkbookChartAxisTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartAxisTitle, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the axis title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxisTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TitleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TitleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TitleRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxisTitle entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class TitleRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderGetQueryParameters(): + """ + Represents the axis title. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class TitleRequestBuilderGetRequestConfiguration(RequestConfiguration[TitleRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/value_axis_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/value_axis_request_builder.py new file mode 100644 index 00000000000..cb75dd4d296 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/axes/value_axis/value_axis_request_builder.py @@ -0,0 +1,227 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_chart_axis import WorkbookChartAxis + from .format.format_request_builder import FormatRequestBuilder + from .major_gridlines.major_gridlines_request_builder import MajorGridlinesRequestBuilder + from .minor_gridlines.minor_gridlines_request_builder import MinorGridlinesRequestBuilder + from .title.title_request_builder import TitleRequestBuilder + +class ValueAxisRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the valueAxis property of the microsoft.graph.workbookChartAxes entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ValueAxisRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/axes/valueAxis{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property valueAxis for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ValueAxisRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxis]: + """ + Represents the value axis in an axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxis] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_axis import WorkbookChartAxis + + return await self.request_adapter.send_async(request_info, WorkbookChartAxis, error_mapping) + + async def patch(self,body: WorkbookChartAxis, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxis]: + """ + Update the navigation property valueAxis in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxis] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_axis import WorkbookChartAxis + + return await self.request_adapter.send_async(request_info, WorkbookChartAxis, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property valueAxis for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ValueAxisRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the value axis in an axis. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxis, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property valueAxis in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ValueAxisRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ValueAxisRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ValueAxisRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartAxis entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def major_gridlines(self) -> MajorGridlinesRequestBuilder: + """ + Provides operations to manage the majorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + from .major_gridlines.major_gridlines_request_builder import MajorGridlinesRequestBuilder + + return MajorGridlinesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def minor_gridlines(self) -> MinorGridlinesRequestBuilder: + """ + Provides operations to manage the minorGridlines property of the microsoft.graph.workbookChartAxis entity. + """ + from .minor_gridlines.minor_gridlines_request_builder import MinorGridlinesRequestBuilder + + return MinorGridlinesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def title(self) -> TitleRequestBuilder: + """ + Provides operations to manage the title property of the microsoft.graph.workbookChartAxis entity. + """ + from .title.title_request_builder import TitleRequestBuilder + + return TitleRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ValueAxisRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ValueAxisRequestBuilderGetQueryParameters(): + """ + Represents the value axis in an axis. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ValueAxisRequestBuilderGetRequestConfiguration(RequestConfiguration[ValueAxisRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ValueAxisRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/data_labels_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/data_labels_request_builder.py new file mode 100644 index 00000000000..25b2aebe0fc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/data_labels_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_data_labels import WorkbookChartDataLabels + from .format.format_request_builder import FormatRequestBuilder + +class DataLabelsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the dataLabels property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataLabelsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/dataLabels{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property dataLabels for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[DataLabelsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartDataLabels]: + """ + Represents the data labels on the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabels] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_data_labels import WorkbookChartDataLabels + + return await self.request_adapter.send_async(request_info, WorkbookChartDataLabels, error_mapping) + + async def patch(self,body: WorkbookChartDataLabels, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartDataLabels]: + """ + Update the navigation property dataLabels in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabels] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_data_labels import WorkbookChartDataLabels + + return await self.request_adapter.send_async(request_info, WorkbookChartDataLabels, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property dataLabels for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DataLabelsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the data labels on the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartDataLabels, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property dataLabels in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DataLabelsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataLabelsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataLabelsRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartDataLabels entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DataLabelsRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DataLabelsRequestBuilderGetQueryParameters(): + """ + Represents the data labels on the chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DataLabelsRequestBuilderGetRequestConfiguration(RequestConfiguration[DataLabelsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DataLabelsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/clear/clear_request_builder.py new file mode 100644 index 00000000000..0a63b5d672f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/dataLabels/format/fill/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/fill_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/fill_request_builder.py new file mode 100644 index 00000000000..0a68f4fa56f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/fill_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_fill import WorkbookChartFill + from .clear.clear_request_builder import ClearRequestBuilder + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + +class FillRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartDataLabelFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FillRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/dataLabels/format/fill{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Represents the fill format of the current chart data label. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + async def patch(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the fill format of the current chart data label. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FillRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FillRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FillRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_solid_color(self) -> SetSolidColorRequestBuilder: + """ + Provides operations to call the setSolidColor method. + """ + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + + return SetSolidColorRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FillRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderGetQueryParameters(): + """ + Represents the fill format of the current chart data label. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FillRequestBuilderGetRequestConfiguration(RequestConfiguration[FillRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_post_request_body.py new file mode 100644 index 00000000000..115f734fefb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class SetSolidColorPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The color property + color: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetSolidColorPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetSolidColorPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetSolidColorPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "color": lambda n : setattr(self, 'color', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("color", self.color) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_request_builder.py new file mode 100644 index 00000000000..27bc6eeca93 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .set_solid_color_post_request_body import SetSolidColorPostRequestBody + +class SetSolidColorRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setSolidColor method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetSolidColorRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/dataLabels/format/fill/setSolidColor", path_parameters) + + async def post(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-setsolidcolor?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetSolidColorRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetSolidColorRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetSolidColorRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetSolidColorRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/font/font_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/font/font_request_builder.py new file mode 100644 index 00000000000..fd6e41a47a0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/font/font_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_font import WorkbookChartFont + +class FontRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartDataLabelFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FontRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/dataLabels/format/font{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Represents the font attributes (font name, font size, color, etc.) for a chart data label. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + async def patch(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the font attributes (font name, font size, color, etc.) for a chart data label. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FontRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FontRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FontRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FontRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderGetQueryParameters(): + """ + Represents the font attributes (font name, font size, color, etc.) for a chart data label. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FontRequestBuilderGetRequestConfiguration(RequestConfiguration[FontRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/format_request_builder.py new file mode 100644 index 00000000000..00f42b07d4f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/data_labels/format/format_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_chart_data_label_format import WorkbookChartDataLabelFormat + from .fill.fill_request_builder import FillRequestBuilder + from .font.font_request_builder import FontRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartDataLabels entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/dataLabels/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartDataLabelFormat]: + """ + Represents the format of chart data labels, which includes fill and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabelFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_data_label_format import WorkbookChartDataLabelFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartDataLabelFormat, error_mapping) + + async def patch(self,body: WorkbookChartDataLabelFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartDataLabelFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabelFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_data_label_format import WorkbookChartDataLabelFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartDataLabelFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the format of chart data labels, which includes fill and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartDataLabelFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def fill(self) -> FillRequestBuilder: + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartDataLabelFormat entity. + """ + from .fill.fill_request_builder import FillRequestBuilder + + return FillRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def font(self) -> FontRequestBuilder: + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartDataLabelFormat entity. + """ + from .font.font_request_builder import FontRequestBuilder + + return FontRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the format of chart data labels, which includes fill and font formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/clear/clear_request_builder.py new file mode 100644 index 00000000000..9bc04934c4d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/format/fill/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/fill_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/fill_request_builder.py new file mode 100644 index 00000000000..6c6b2c9fb6e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/fill_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_chart_fill import WorkbookChartFill + from .clear.clear_request_builder import ClearRequestBuilder + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + +class FillRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartAreaFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FillRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/format/fill{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Represents the fill format of an object, which includes background formatting information. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + async def patch(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the fill format of an object, which includes background formatting information. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FillRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FillRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FillRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_solid_color(self) -> SetSolidColorRequestBuilder: + """ + Provides operations to call the setSolidColor method. + """ + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + + return SetSolidColorRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FillRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderGetQueryParameters(): + """ + Represents the fill format of an object, which includes background formatting information. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FillRequestBuilderGetRequestConfiguration(RequestConfiguration[FillRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_post_request_body.py new file mode 100644 index 00000000000..115f734fefb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class SetSolidColorPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The color property + color: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetSolidColorPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetSolidColorPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetSolidColorPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "color": lambda n : setattr(self, 'color', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("color", self.color) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_request_builder.py new file mode 100644 index 00000000000..9f405f808e7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from .set_solid_color_post_request_body import SetSolidColorPostRequestBody + +class SetSolidColorRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setSolidColor method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetSolidColorRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/format/fill/setSolidColor", path_parameters) + + async def post(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-setsolidcolor?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetSolidColorRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetSolidColorRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetSolidColorRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetSolidColorRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/font/font_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/font/font_request_builder.py new file mode 100644 index 00000000000..930bf2988fc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/font/font_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_chart_font import WorkbookChartFont + +class FontRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAreaFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FontRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/format/font{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Represents the font attributes (font name, font size, color, etc.) for the current object. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + async def patch(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the font attributes (font name, font size, color, etc.) for the current object. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FontRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FontRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FontRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FontRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderGetQueryParameters(): + """ + Represents the font attributes (font name, font size, color, etc.) for the current object. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FontRequestBuilderGetRequestConfiguration(RequestConfiguration[FontRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/format_request_builder.py new file mode 100644 index 00000000000..548d1801e5b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/format/format_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_area_format import WorkbookChartAreaFormat + from .fill.fill_request_builder import FillRequestBuilder + from .font.font_request_builder import FontRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAreaFormat]: + """ + Encapsulates the format properties for the chart area. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAreaFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_area_format import WorkbookChartAreaFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAreaFormat, error_mapping) + + async def patch(self,body: WorkbookChartAreaFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAreaFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAreaFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_area_format import WorkbookChartAreaFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAreaFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Encapsulates the format properties for the chart area. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAreaFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def fill(self) -> FillRequestBuilder: + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartAreaFormat entity. + """ + from .fill.fill_request_builder import FillRequestBuilder + + return FillRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def font(self) -> FontRequestBuilder: + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartAreaFormat entity. + """ + from .font.font_request_builder import FontRequestBuilder + + return FontRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Encapsulates the format properties for the chart area. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image/image_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image/image_get_response.py new file mode 100644 index 00000000000..95b4b9c482c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image/image_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image/image_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image/image_request_builder.py new file mode 100644 index 00000000000..899e1e0b32e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image/image_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_get_response import ImageGetResponse + +class ImageRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImageRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/image()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_get_response import ImageGetResponse + + return await self.request_adapter.send_async(request_info, ImageGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_get_response.py new file mode 100644 index 00000000000..548984ccb1c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageWithWidthGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageWithWidthGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageWithWidthGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageWithWidthGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_request_builder.py new file mode 100644 index 00000000000..a36b7ab1651 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width/image_with_width_request_builder.py @@ -0,0 +1,83 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_with_width_get_response import ImageWithWidthGetResponse + +class ImageWithWidthRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], width: Optional[int] = None) -> None: + """ + Instantiates a new ImageWithWidthRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param width: Usage: width={width} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['width'] = str(width) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/image(width={width})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageWithWidthGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageWithWidthGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_with_width_get_response import ImageWithWidthGetResponse + + return await self.request_adapter.send_async(request_info, ImageWithWidthGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageWithWidthRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageWithWidthRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageWithWidthRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageWithWidthRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_get_response.py new file mode 100644 index 00000000000..b9a6dc30fd4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageWithWidthWithHeightGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageWithWidthWithHeightGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageWithWidthWithHeightGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageWithWidthWithHeightGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_request_builder.py new file mode 100644 index 00000000000..f3214608873 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height/image_with_width_with_height_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_with_width_with_height_get_response import ImageWithWidthWithHeightGetResponse + +class ImageWithWidthWithHeightRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], height: Optional[int] = None, width: Optional[int] = None) -> None: + """ + Instantiates a new ImageWithWidthWithHeightRequestBuilder and sets the default values. + param height: Usage: height={height} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param width: Usage: width={width} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['height'] = str(height) + path_parameters['width'] = str(width) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/image(width={width},height={height})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageWithWidthWithHeightGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageWithWidthWithHeightGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_with_width_with_height_get_response import ImageWithWidthWithHeightGetResponse + + return await self.request_adapter.send_async(request_info, ImageWithWidthWithHeightGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageWithWidthWithHeightRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageWithWidthWithHeightRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageWithWidthWithHeightRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py new file mode 100644 index 00000000000..a41138e8e05 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageWithWidthWithHeightWithFittingModeGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageWithWidthWithHeightWithFittingModeGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageWithWidthWithHeightWithFittingModeGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageWithWidthWithHeightWithFittingModeGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py new file mode 100644 index 00000000000..ca1a6decaae --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py @@ -0,0 +1,87 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_with_width_with_height_with_fitting_mode_get_response import ImageWithWidthWithHeightWithFittingModeGetResponse + +class ImageWithWidthWithHeightWithFittingModeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], fitting_mode: Optional[str] = None, height: Optional[int] = None, width: Optional[int] = None) -> None: + """ + Instantiates a new ImageWithWidthWithHeightWithFittingModeRequestBuilder and sets the default values. + param fitting_mode: Usage: fittingMode='{fittingMode}' + param height: Usage: height={height} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param width: Usage: width={width} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['fittingMode'] = str(fitting_mode) + path_parameters['height'] = str(height) + path_parameters['width'] = str(width) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/image(width={width},height={height},fittingMode='{fittingMode}')", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageWithWidthWithHeightWithFittingModeGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageWithWidthWithHeightWithFittingModeGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_with_width_with_height_with_fitting_mode_get_response import ImageWithWidthWithHeightWithFittingModeGetResponse + + return await self.request_adapter.send_async(request_info, ImageWithWidthWithHeightWithFittingModeGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageWithWidthWithHeightWithFittingModeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageWithWidthWithHeightWithFittingModeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageWithWidthWithHeightWithFittingModeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/clear/clear_request_builder.py new file mode 100644 index 00000000000..2d32c7c4a45 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/legend/format/fill/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/fill_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/fill_request_builder.py new file mode 100644 index 00000000000..afeadd672de --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/fill_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_fill import WorkbookChartFill + from .clear.clear_request_builder import ClearRequestBuilder + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + +class FillRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartLegendFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FillRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/legend/format/fill{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Represents the fill format of an object, which includes background formating information. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + async def patch(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the fill format of an object, which includes background formating information. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FillRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FillRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FillRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_solid_color(self) -> SetSolidColorRequestBuilder: + """ + Provides operations to call the setSolidColor method. + """ + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + + return SetSolidColorRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FillRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderGetQueryParameters(): + """ + Represents the fill format of an object, which includes background formating information. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FillRequestBuilderGetRequestConfiguration(RequestConfiguration[FillRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_post_request_body.py new file mode 100644 index 00000000000..115f734fefb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class SetSolidColorPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The color property + color: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetSolidColorPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetSolidColorPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetSolidColorPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "color": lambda n : setattr(self, 'color', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("color", self.color) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_request_builder.py new file mode 100644 index 00000000000..e4e4d360dfa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .set_solid_color_post_request_body import SetSolidColorPostRequestBody + +class SetSolidColorRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setSolidColor method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetSolidColorRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/legend/format/fill/setSolidColor", path_parameters) + + async def post(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-setsolidcolor?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetSolidColorRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetSolidColorRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetSolidColorRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetSolidColorRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/font/font_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/font/font_request_builder.py new file mode 100644 index 00000000000..a32053a846d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/font/font_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_font import WorkbookChartFont + +class FontRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartLegendFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FontRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/legend/format/font{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Represents the font attributes such as font name, font size, color, etc. of a chart legend. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + async def patch(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the font attributes such as font name, font size, color, etc. of a chart legend. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FontRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FontRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FontRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FontRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderGetQueryParameters(): + """ + Represents the font attributes such as font name, font size, color, etc. of a chart legend. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FontRequestBuilderGetRequestConfiguration(RequestConfiguration[FontRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/format_request_builder.py new file mode 100644 index 00000000000..5493ffa2093 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/format/format_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_chart_legend_format import WorkbookChartLegendFormat + from .fill.fill_request_builder import FillRequestBuilder + from .font.font_request_builder import FontRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartLegend entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/legend/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLegendFormat]: + """ + Represents the formatting of a chart legend, which includes fill and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegendFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_legend_format import WorkbookChartLegendFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLegendFormat, error_mapping) + + async def patch(self,body: WorkbookChartLegendFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLegendFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegendFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_legend_format import WorkbookChartLegendFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLegendFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of a chart legend, which includes fill and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLegendFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def fill(self) -> FillRequestBuilder: + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartLegendFormat entity. + """ + from .fill.fill_request_builder import FillRequestBuilder + + return FillRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def font(self) -> FontRequestBuilder: + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartLegendFormat entity. + """ + from .font.font_request_builder import FontRequestBuilder + + return FontRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of a chart legend, which includes fill and font formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/legend_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/legend_request_builder.py new file mode 100644 index 00000000000..735b0965d87 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/legend/legend_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_legend import WorkbookChartLegend + from .format.format_request_builder import FormatRequestBuilder + +class LegendRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the legend property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LegendRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/legend{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property legend for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LegendRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLegend]: + """ + Represents the legend for the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegend] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_legend import WorkbookChartLegend + + return await self.request_adapter.send_async(request_info, WorkbookChartLegend, error_mapping) + + async def patch(self,body: WorkbookChartLegend, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLegend]: + """ + Update the navigation property legend in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegend] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_legend import WorkbookChartLegend + + return await self.request_adapter.send_async(request_info, WorkbookChartLegend, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property legend for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LegendRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the legend for the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLegend, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property legend in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LegendRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LegendRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LegendRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartLegend entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LegendRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LegendRequestBuilderGetQueryParameters(): + """ + Represents the legend for the chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LegendRequestBuilderGetRequestConfiguration(RequestConfiguration[LegendRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LegendRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/count/count_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/count/count_get_response.py new file mode 100644 index 00000000000..adc36fe76ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/count/count_request_builder.py new file mode 100644 index 00000000000..aa4eab61702 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/count/count_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .count_get_response import CountGetResponse + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the count method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/count()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CountGetResponse]: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CountGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .count_get_response import CountGetResponse + + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/clear/clear_request_builder.py new file mode 100644 index 00000000000..3bc81fff5d0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/format/fill/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/fill_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/fill_request_builder.py new file mode 100644 index 00000000000..22a2535b33b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/fill_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_fill import WorkbookChartFill + from .clear.clear_request_builder import ClearRequestBuilder + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + +class FillRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartSeriesFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FillRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/format/fill{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Represents the fill format of a chart series, which includes background formatting information. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + async def patch(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the fill format of a chart series, which includes background formatting information. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FillRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FillRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FillRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_solid_color(self) -> SetSolidColorRequestBuilder: + """ + Provides operations to call the setSolidColor method. + """ + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + + return SetSolidColorRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FillRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderGetQueryParameters(): + """ + Represents the fill format of a chart series, which includes background formatting information. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FillRequestBuilderGetRequestConfiguration(RequestConfiguration[FillRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_post_request_body.py new file mode 100644 index 00000000000..115f734fefb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class SetSolidColorPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The color property + color: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetSolidColorPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetSolidColorPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetSolidColorPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "color": lambda n : setattr(self, 'color', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("color", self.color) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_request_builder.py new file mode 100644 index 00000000000..69f57924df7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from .set_solid_color_post_request_body import SetSolidColorPostRequestBody + +class SetSolidColorRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setSolidColor method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetSolidColorRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/format/fill/setSolidColor", path_parameters) + + async def post(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-setsolidcolor?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetSolidColorRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetSolidColorRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetSolidColorRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetSolidColorRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/format_request_builder.py new file mode 100644 index 00000000000..3f98950004c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/format_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_series_format import WorkbookChartSeriesFormat + from .fill.fill_request_builder import FillRequestBuilder + from .line.line_request_builder import LineRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartSeries entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartSeriesFormat]: + """ + Represents the formatting of a chart series, which includes fill and line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeriesFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_series_format import WorkbookChartSeriesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartSeriesFormat, error_mapping) + + async def patch(self,body: WorkbookChartSeriesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartSeriesFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeriesFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_series_format import WorkbookChartSeriesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartSeriesFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of a chart series, which includes fill and line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartSeriesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def fill(self) -> FillRequestBuilder: + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartSeriesFormat entity. + """ + from .fill.fill_request_builder import FillRequestBuilder + + return FillRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def line(self) -> LineRequestBuilder: + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartSeriesFormat entity. + """ + from .line.line_request_builder import LineRequestBuilder + + return LineRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of a chart series, which includes fill and line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/line/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/line/clear/clear_request_builder.py new file mode 100644 index 00000000000..3b6d3dd37ae --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/line/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/format/line/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartlineformat-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the line format of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/line/line_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/line/line_request_builder.py new file mode 100644 index 00000000000..1cd5f2fa5bc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/format/line/line_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + from .clear.clear_request_builder import ClearRequestBuilder + +class LineRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the line property of the microsoft.graph.workbookChartSeriesFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LineRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/format/line{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Represents line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + async def patch(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLineFormat]: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLineFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_line_format import WorkbookChartLineFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartLineFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property line for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LineRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLineFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property line in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LineRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LineRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LineRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LineRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderGetQueryParameters(): + """ + Represents line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LineRequestBuilderGetRequestConfiguration(RequestConfiguration[LineRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LineRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_get_response.py new file mode 100644 index 00000000000..adc36fe76ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_request_builder.py new file mode 100644 index 00000000000..7cded844380 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/count/count_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .count_get_response import CountGetResponse + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the count method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/count()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CountGetResponse]: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CountGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .count_get_response import CountGetResponse + + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/clear/clear_request_builder.py new file mode 100644 index 00000000000..3d05f98ff85 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ....................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/{workbookChartPoint%2Did}/format/fill/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ....................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/fill_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/fill_request_builder.py new file mode 100644 index 00000000000..58f8740d82f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/fill_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...................models.o_data_errors.o_data_error import ODataError + from ...................models.workbook_chart_fill import WorkbookChartFill + from .clear.clear_request_builder import ClearRequestBuilder + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + +class FillRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartPointFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FillRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/{workbookChartPoint%2Did}/format/fill{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Represents the fill format of a chart, which includes background formatting information. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...................models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + async def patch(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...................models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the fill format of a chart, which includes background formatting information. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FillRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FillRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FillRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_solid_color(self) -> SetSolidColorRequestBuilder: + """ + Provides operations to call the setSolidColor method. + """ + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + + return SetSolidColorRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FillRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderGetQueryParameters(): + """ + Represents the fill format of a chart, which includes background formatting information. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FillRequestBuilderGetRequestConfiguration(RequestConfiguration[FillRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_post_request_body.py new file mode 100644 index 00000000000..115f734fefb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class SetSolidColorPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The color property + color: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetSolidColorPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetSolidColorPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetSolidColorPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "color": lambda n : setattr(self, 'color', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("color", self.color) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_request_builder.py new file mode 100644 index 00000000000..344d57eaef5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ....................models.o_data_errors.o_data_error import ODataError + from .set_solid_color_post_request_body import SetSolidColorPostRequestBody + +class SetSolidColorRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setSolidColor method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetSolidColorRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/{workbookChartPoint%2Did}/format/fill/setSolidColor", path_parameters) + + async def post(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-setsolidcolor?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ....................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetSolidColorRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetSolidColorRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetSolidColorRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetSolidColorRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/format_request_builder.py new file mode 100644 index 00000000000..bf636600e20 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/format/format_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_point_format import WorkbookChartPointFormat + from .fill.fill_request_builder import FillRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartPoint entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/{workbookChartPoint%2Did}/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartPointFormat]: + """ + Encapsulates the format properties chart point. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPointFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_point_format import WorkbookChartPointFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartPointFormat, error_mapping) + + async def patch(self,body: WorkbookChartPointFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartPointFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPointFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_point_format import WorkbookChartPointFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartPointFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Encapsulates the format properties chart point. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartPointFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def fill(self) -> FillRequestBuilder: + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartPointFormat entity. + """ + from .fill.fill_request_builder import FillRequestBuilder + + return FillRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Encapsulates the format properties chart point. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/workbook_chart_point_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/workbook_chart_point_item_request_builder.py new file mode 100644 index 00000000000..81f8d0d75dd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item/workbook_chart_point_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_point import WorkbookChartPoint + from .format.format_request_builder import FormatRequestBuilder + +class WorkbookChartPointItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the points property of the microsoft.graph.workbookChartSeries entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookChartPointItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/{workbookChartPoint%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property points for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookChartPointItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartPoint]: + """ + Represents a collection of all points in the series. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPoint] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_point import WorkbookChartPoint + + return await self.request_adapter.send_async(request_info, WorkbookChartPoint, error_mapping) + + async def patch(self,body: WorkbookChartPoint, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartPoint]: + """ + Update the navigation property points in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPoint] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_point import WorkbookChartPoint + + return await self.request_adapter.send_async(request_info, WorkbookChartPoint, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property points for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookChartPointItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all points in the series. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartPoint, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property points in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookChartPointItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookChartPointItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookChartPointItemRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartPoint entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookChartPointItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookChartPointItemRequestBuilderGetQueryParameters(): + """ + Represents a collection of all points in the series. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookChartPointItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookChartPointItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookChartPointItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/format/format_request_builder.py new file mode 100644 index 00000000000..39a935b1e12 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/format/format_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..................models.o_data_errors.o_data_error import ODataError + from ..................models.workbook_chart_point_format import WorkbookChartPointFormat + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartPoint entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/itemAt(index={index})/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartPointFormat]: + """ + Encapsulates the format properties chart point. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPointFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_point_format import WorkbookChartPointFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartPointFormat, error_mapping) + + async def patch(self,body: WorkbookChartPointFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartPointFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPointFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..................models.workbook_chart_point_format import WorkbookChartPointFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartPointFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Encapsulates the format properties chart point. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartPointFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Encapsulates the format properties chart point. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/item_at_with_index_request_builder.py new file mode 100644 index 00000000000..c6c617cf996 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/item_at_with_index/item_at_with_index_request_builder.py @@ -0,0 +1,94 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .................models.workbook_chart_point import WorkbookChartPoint + from .format.format_request_builder import FormatRequestBuilder + +class ItemAtWithIndexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the itemAt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], index: Optional[int] = None) -> None: + """ + Instantiates a new ItemAtWithIndexRequestBuilder and sets the default values. + param index: Usage: index={index} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points/itemAt(index={index})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartPoint]: + """ + Retrieve a point based on its position within the series. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPoint] + Find more info here: https://learn.microsoft.com/graph/api/chartpointscollection-itemat?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .................models.workbook_chart_point import WorkbookChartPoint + + return await self.request_adapter.send_async(request_info, WorkbookChartPoint, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Retrieve a point based on its position within the series. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ItemAtWithIndexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemAtWithIndexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemAtWithIndexRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartPoint entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemAtWithIndexRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/points_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/points_request_builder.py new file mode 100644 index 00000000000..5220daccdb3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/points/points_request_builder.py @@ -0,0 +1,220 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_point import WorkbookChartPoint + from ................models.workbook_chart_point_collection_response import WorkbookChartPointCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_chart_point_item_request_builder import WorkbookChartPointItemRequestBuilder + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + +class PointsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the points property of the microsoft.graph.workbookChartSeries entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PointsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}/points{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_chart_point_id(self,workbook_chart_point_id: str) -> WorkbookChartPointItemRequestBuilder: + """ + Provides operations to manage the points property of the microsoft.graph.workbookChartSeries entity. + param workbook_chart_point_id: The unique identifier of workbookChartPoint + Returns: WorkbookChartPointItemRequestBuilder + """ + if not workbook_chart_point_id: + raise TypeError("workbook_chart_point_id cannot be null.") + from .item.workbook_chart_point_item_request_builder import WorkbookChartPointItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookChartPoint%2Did"] = workbook_chart_point_id + return WorkbookChartPointItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[PointsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartPointCollectionResponse]: + """ + Represents a collection of all points in the series. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPointCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_point_collection_response import WorkbookChartPointCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookChartPointCollectionResponse, error_mapping) + + def item_at_with_index(self,index: int) -> ItemAtWithIndexRequestBuilder: + """ + Provides operations to call the itemAt method. + param index: Usage: index={index} + Returns: ItemAtWithIndexRequestBuilder + """ + if not index: + raise TypeError("index cannot be null.") + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + + return ItemAtWithIndexRequestBuilder(self.request_adapter, self.path_parameters, index) + + async def post(self,body: WorkbookChartPoint, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartPoint]: + """ + Create new navigation property to points for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPoint] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_point import WorkbookChartPoint + + return await self.request_adapter.send_async(request_info, WorkbookChartPoint, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PointsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all points in the series. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookChartPoint, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to points for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PointsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PointsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PointsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to call the count method. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class PointsRequestBuilderGetQueryParameters(): + """ + Represents a collection of all points in the series. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class PointsRequestBuilderGetRequestConfiguration(RequestConfiguration[PointsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class PointsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/workbook_chart_series_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/workbook_chart_series_item_request_builder.py new file mode 100644 index 00000000000..8990286e428 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item/workbook_chart_series_item_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_chart_series import WorkbookChartSeries + from .format.format_request_builder import FormatRequestBuilder + from .points.points_request_builder import PointsRequestBuilder + +class WorkbookChartSeriesItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the series property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookChartSeriesItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/{workbookChartSeries%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property series for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookChartSeriesItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartSeries]: + """ + Represents either a single series or collection of series in the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeries] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_series import WorkbookChartSeries + + return await self.request_adapter.send_async(request_info, WorkbookChartSeries, error_mapping) + + async def patch(self,body: WorkbookChartSeries, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartSeries]: + """ + Update the navigation property series in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeries] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_series import WorkbookChartSeries + + return await self.request_adapter.send_async(request_info, WorkbookChartSeries, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property series for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookChartSeriesItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents either a single series or collection of series in the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartSeries, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property series in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookChartSeriesItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookChartSeriesItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookChartSeriesItemRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartSeries entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def points(self) -> PointsRequestBuilder: + """ + Provides operations to manage the points property of the microsoft.graph.workbookChartSeries entity. + """ + from .points.points_request_builder import PointsRequestBuilder + + return PointsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookChartSeriesItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookChartSeriesItemRequestBuilderGetQueryParameters(): + """ + Represents either a single series or collection of series in the chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookChartSeriesItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookChartSeriesItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookChartSeriesItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/format/format_request_builder.py new file mode 100644 index 00000000000..ceb886c1fa1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/format/format_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_series_format import WorkbookChartSeriesFormat + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartSeries entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/itemAt(index={index})/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartSeriesFormat]: + """ + Represents the formatting of a chart series, which includes fill and line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeriesFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_series_format import WorkbookChartSeriesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartSeriesFormat, error_mapping) + + async def patch(self,body: WorkbookChartSeriesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartSeriesFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeriesFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_series_format import WorkbookChartSeriesFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartSeriesFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of a chart series, which includes fill and line formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartSeriesFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of a chart series, which includes fill and line formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/item_at_with_index_request_builder.py new file mode 100644 index 00000000000..d93f48706a8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/item_at_with_index_request_builder.py @@ -0,0 +1,104 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_chart_series import WorkbookChartSeries + from .format.format_request_builder import FormatRequestBuilder + from .points.points_request_builder import PointsRequestBuilder + +class ItemAtWithIndexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the itemAt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], index: Optional[int] = None) -> None: + """ + Instantiates a new ItemAtWithIndexRequestBuilder and sets the default values. + param index: Usage: index={index} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/itemAt(index={index})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartSeries]: + """ + Retrieves a series based on its position in the collection + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeries] + Find more info here: https://learn.microsoft.com/graph/api/chartseriescollection-itemat?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_series import WorkbookChartSeries + + return await self.request_adapter.send_async(request_info, WorkbookChartSeries, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Retrieves a series based on its position in the collection + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ItemAtWithIndexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemAtWithIndexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemAtWithIndexRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartSeries entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def points(self) -> PointsRequestBuilder: + """ + Provides operations to manage the points property of the microsoft.graph.workbookChartSeries entity. + """ + from .points.points_request_builder import PointsRequestBuilder + + return PointsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemAtWithIndexRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/points/points_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/points/points_request_builder.py new file mode 100644 index 00000000000..2defc16850a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/item_at_with_index/points/points_request_builder.py @@ -0,0 +1,182 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_point import WorkbookChartPoint + from ................models.workbook_chart_point_collection_response import WorkbookChartPointCollectionResponse + +class PointsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the points property of the microsoft.graph.workbookChartSeries entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PointsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series/itemAt(index={index})/points{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[PointsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartPointCollectionResponse]: + """ + Represents a collection of all points in the series. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPointCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_point_collection_response import WorkbookChartPointCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookChartPointCollectionResponse, error_mapping) + + async def post(self,body: WorkbookChartPoint, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartPoint]: + """ + Create new navigation property to points for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartPoint] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_point import WorkbookChartPoint + + return await self.request_adapter.send_async(request_info, WorkbookChartPoint, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PointsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all points in the series. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookChartPoint, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to points for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PointsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PointsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PointsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PointsRequestBuilderGetQueryParameters(): + """ + Represents a collection of all points in the series. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class PointsRequestBuilderGetRequestConfiguration(RequestConfiguration[PointsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class PointsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/series_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/series_request_builder.py new file mode 100644 index 00000000000..214102847fb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/series/series_request_builder.py @@ -0,0 +1,220 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_series import WorkbookChartSeries + from ..............models.workbook_chart_series_collection_response import WorkbookChartSeriesCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_chart_series_item_request_builder import WorkbookChartSeriesItemRequestBuilder + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + +class SeriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the series property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SeriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/series{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_chart_series_id(self,workbook_chart_series_id: str) -> WorkbookChartSeriesItemRequestBuilder: + """ + Provides operations to manage the series property of the microsoft.graph.workbookChart entity. + param workbook_chart_series_id: The unique identifier of workbookChartSeries + Returns: WorkbookChartSeriesItemRequestBuilder + """ + if not workbook_chart_series_id: + raise TypeError("workbook_chart_series_id cannot be null.") + from .item.workbook_chart_series_item_request_builder import WorkbookChartSeriesItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookChartSeries%2Did"] = workbook_chart_series_id + return WorkbookChartSeriesItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[SeriesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartSeriesCollectionResponse]: + """ + Represents either a single series or collection of series in the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeriesCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_series_collection_response import WorkbookChartSeriesCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookChartSeriesCollectionResponse, error_mapping) + + def item_at_with_index(self,index: int) -> ItemAtWithIndexRequestBuilder: + """ + Provides operations to call the itemAt method. + param index: Usage: index={index} + Returns: ItemAtWithIndexRequestBuilder + """ + if not index: + raise TypeError("index cannot be null.") + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + + return ItemAtWithIndexRequestBuilder(self.request_adapter, self.path_parameters, index) + + async def post(self,body: WorkbookChartSeries, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartSeries]: + """ + Create new navigation property to series for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeries] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_series import WorkbookChartSeries + + return await self.request_adapter.send_async(request_info, WorkbookChartSeries, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SeriesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents either a single series or collection of series in the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookChartSeries, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to series for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SeriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SeriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SeriesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to call the count method. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SeriesRequestBuilderGetQueryParameters(): + """ + Represents either a single series or collection of series in the chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class SeriesRequestBuilderGetRequestConfiguration(RequestConfiguration[SeriesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SeriesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_data/set_data_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_data/set_data_post_request_body.py new file mode 100644 index 00000000000..73f33ad1199 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_data/set_data_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..............models.json import Json + +@dataclass +class SetDataPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The seriesBy property + series_by: Optional[str] = None + # The sourceData property + source_data: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetDataPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetDataPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetDataPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..............models.json import Json + + from ..............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "seriesBy": lambda n : setattr(self, 'series_by', n.get_str_value()), + "sourceData": lambda n : setattr(self, 'source_data', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("seriesBy", self.series_by) + writer.write_object_value("sourceData", self.source_data) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_data/set_data_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_data/set_data_request_builder.py new file mode 100644 index 00000000000..8a546f78fc1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_data/set_data_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .set_data_post_request_body import SetDataPostRequestBody + +class SetDataRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setData method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetDataRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/setData", path_parameters) + + async def post(self,body: SetDataPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Resets the source data for the chart. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chart-setdata?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetDataPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Resets the source data for the chart. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetDataRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetDataRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetDataRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetDataRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_position/set_position_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_position/set_position_post_request_body.py new file mode 100644 index 00000000000..0efc303fdaa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_position/set_position_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..............models.json import Json + +@dataclass +class SetPositionPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The endCell property + end_cell: Optional[Json] = None + # The startCell property + start_cell: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetPositionPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetPositionPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetPositionPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..............models.json import Json + + from ..............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "endCell": lambda n : setattr(self, 'end_cell', n.get_object_value(Json)), + "startCell": lambda n : setattr(self, 'start_cell', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("endCell", self.end_cell) + writer.write_object_value("startCell", self.start_cell) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_position/set_position_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_position/set_position_request_builder.py new file mode 100644 index 00000000000..60b341c23da --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/set_position/set_position_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .set_position_post_request_body import SetPositionPostRequestBody + +class SetPositionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setPosition method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetPositionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/setPosition", path_parameters) + + async def post(self,body: SetPositionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Positions the chart relative to cells on the worksheet. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chart-setposition?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetPositionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Positions the chart relative to cells on the worksheet. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetPositionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetPositionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetPositionRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetPositionRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/clear/clear_request_builder.py new file mode 100644 index 00000000000..56806614757 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/title/format/fill/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the fill color of a chart element. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/fill_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/fill_request_builder.py new file mode 100644 index 00000000000..cfc270414de --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/fill_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_fill import WorkbookChartFill + from .clear.clear_request_builder import ClearRequestBuilder + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + +class FillRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartTitleFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FillRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/title/format/fill{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Represents the fill format of an object, which includes background formatting information. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + async def patch(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFill]: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFill] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_fill import WorkbookChartFill + + return await self.request_adapter.send_async(request_info, WorkbookChartFill, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property fill for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FillRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the fill format of an object, which includes background formatting information. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFill, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property fill in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FillRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FillRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FillRequestBuilder(self.request_adapter, raw_url) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_solid_color(self) -> SetSolidColorRequestBuilder: + """ + Provides operations to call the setSolidColor method. + """ + from .set_solid_color.set_solid_color_request_builder import SetSolidColorRequestBuilder + + return SetSolidColorRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FillRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderGetQueryParameters(): + """ + Represents the fill format of an object, which includes background formatting information. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FillRequestBuilderGetRequestConfiguration(RequestConfiguration[FillRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FillRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_post_request_body.py new file mode 100644 index 00000000000..115f734fefb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class SetSolidColorPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The color property + color: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetSolidColorPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetSolidColorPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetSolidColorPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "color": lambda n : setattr(self, 'color', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("color", self.color) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_request_builder.py new file mode 100644 index 00000000000..097ec381dd5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/fill/set_solid_color/set_solid_color_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .set_solid_color_post_request_body import SetSolidColorPostRequestBody + +class SetSolidColorRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setSolidColor method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetSolidColorRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/title/format/fill/setSolidColor", path_parameters) + + async def post(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chartfill-setsolidcolor?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetSolidColorPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Sets the fill formatting of a chart element to a uniform color. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetSolidColorRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetSolidColorRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetSolidColorRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetSolidColorRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/font/font_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/font/font_request_builder.py new file mode 100644 index 00000000000..6a4961ffeff --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/font/font_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_chart_font import WorkbookChartFont + +class FontRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartTitleFormat entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FontRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/title/format/font{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Represents the font attributes (font name, font size, color, etc.) for the current object. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + async def patch(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartFont]: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartFont] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_chart_font import WorkbookChartFont + + return await self.request_adapter.send_async(request_info, WorkbookChartFont, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property font for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FontRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the font attributes (font name, font size, color, etc.) for the current object. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartFont, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property font in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FontRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FontRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FontRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FontRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderGetQueryParameters(): + """ + Represents the font attributes (font name, font size, color, etc.) for the current object. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FontRequestBuilderGetRequestConfiguration(RequestConfiguration[FontRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FontRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/format_request_builder.py new file mode 100644 index 00000000000..b01640c6356 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/format/format_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_chart_title_format import WorkbookChartTitleFormat + from .fill.fill_request_builder import FillRequestBuilder + from .font.font_request_builder import FontRequestBuilder + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartTitle entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/title/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartTitleFormat]: + """ + Represents the formatting of a chart title, which includes fill and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitleFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_title_format import WorkbookChartTitleFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartTitleFormat, error_mapping) + + async def patch(self,body: WorkbookChartTitleFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartTitleFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitleFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_chart_title_format import WorkbookChartTitleFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartTitleFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the formatting of a chart title, which includes fill and font formatting. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartTitleFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @property + def fill(self) -> FillRequestBuilder: + """ + Provides operations to manage the fill property of the microsoft.graph.workbookChartTitleFormat entity. + """ + from .fill.fill_request_builder import FillRequestBuilder + + return FillRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def font(self) -> FontRequestBuilder: + """ + Provides operations to manage the font property of the microsoft.graph.workbookChartTitleFormat entity. + """ + from .font.font_request_builder import FontRequestBuilder + + return FontRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Represents the formatting of a chart title, which includes fill and font formatting. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/title_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/title_request_builder.py new file mode 100644 index 00000000000..a9c46aea562 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/title/title_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_title import WorkbookChartTitle + from .format.format_request_builder import FormatRequestBuilder + +class TitleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the title property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TitleRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/title{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartTitle]: + """ + Represents the title of the specified chart, including the text, visibility, position and formatting of the title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitle] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_title import WorkbookChartTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartTitle, error_mapping) + + async def patch(self,body: WorkbookChartTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartTitle]: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitle] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_title import WorkbookChartTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartTitle, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the title of the specified chart, including the text, visibility, position and formatting of the title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TitleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TitleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TitleRequestBuilder(self.request_adapter, raw_url) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChartTitle entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class TitleRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderGetQueryParameters(): + """ + Represents the title of the specified chart, including the text, visibility, position and formatting of the title. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class TitleRequestBuilderGetRequestConfiguration(RequestConfiguration[TitleRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/workbook_chart_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/workbook_chart_item_request_builder.py new file mode 100644 index 00000000000..d07f6aa44ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/workbook_chart_item_request_builder.py @@ -0,0 +1,335 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_chart import WorkbookChart + from .axes.axes_request_builder import AxesRequestBuilder + from .data_labels.data_labels_request_builder import DataLabelsRequestBuilder + from .format.format_request_builder import FormatRequestBuilder + from .image.image_request_builder import ImageRequestBuilder + from .image_with_width.image_with_width_request_builder import ImageWithWidthRequestBuilder + from .image_with_width_with_height.image_with_width_with_height_request_builder import ImageWithWidthWithHeightRequestBuilder + from .image_with_width_with_height_with_fitting_mode.image_with_width_with_height_with_fitting_mode_request_builder import ImageWithWidthWithHeightWithFittingModeRequestBuilder + from .legend.legend_request_builder import LegendRequestBuilder + from .series.series_request_builder import SeriesRequestBuilder + from .set_data.set_data_request_builder import SetDataRequestBuilder + from .set_position.set_position_request_builder import SetPositionRequestBuilder + from .title.title_request_builder import TitleRequestBuilder + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + +class WorkbookChartItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the charts property of the microsoft.graph.workbookWorksheet entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookChartItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property charts for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookChartItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChart]: + """ + Returns collection of charts that are part of the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChart] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_chart import WorkbookChart + + return await self.request_adapter.send_async(request_info, WorkbookChart, error_mapping) + + def image_with_width(self,width: int) -> ImageWithWidthRequestBuilder: + """ + Provides operations to call the image method. + param width: Usage: width={width} + Returns: ImageWithWidthRequestBuilder + """ + if not width: + raise TypeError("width cannot be null.") + from .image_with_width.image_with_width_request_builder import ImageWithWidthRequestBuilder + + return ImageWithWidthRequestBuilder(self.request_adapter, self.path_parameters, width) + + def image_with_width_with_height(self,height: int, width: int) -> ImageWithWidthWithHeightRequestBuilder: + """ + Provides operations to call the image method. + param height: Usage: height={height} + param width: Usage: width={width} + Returns: ImageWithWidthWithHeightRequestBuilder + """ + if not height: + raise TypeError("height cannot be null.") + if not width: + raise TypeError("width cannot be null.") + from .image_with_width_with_height.image_with_width_with_height_request_builder import ImageWithWidthWithHeightRequestBuilder + + return ImageWithWidthWithHeightRequestBuilder(self.request_adapter, self.path_parameters, height, width) + + def image_with_width_with_height_with_fitting_mode(self,fitting_mode: str, height: int, width: int) -> ImageWithWidthWithHeightWithFittingModeRequestBuilder: + """ + Provides operations to call the image method. + param fitting_mode: Usage: fittingMode='{fittingMode}' + param height: Usage: height={height} + param width: Usage: width={width} + Returns: ImageWithWidthWithHeightWithFittingModeRequestBuilder + """ + if not fitting_mode: + raise TypeError("fitting_mode cannot be null.") + if not height: + raise TypeError("height cannot be null.") + if not width: + raise TypeError("width cannot be null.") + from .image_with_width_with_height_with_fitting_mode.image_with_width_with_height_with_fitting_mode_request_builder import ImageWithWidthWithHeightWithFittingModeRequestBuilder + + return ImageWithWidthWithHeightWithFittingModeRequestBuilder(self.request_adapter, self.path_parameters, fitting_mode, height, width) + + async def patch(self,body: WorkbookChart, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChart]: + """ + Update the navigation property charts in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChart] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_chart import WorkbookChart + + return await self.request_adapter.send_async(request_info, WorkbookChart, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property charts for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookChartItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns collection of charts that are part of the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChart, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property charts in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookChartItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookChartItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookChartItemRequestBuilder(self.request_adapter, raw_url) + + @property + def axes(self) -> AxesRequestBuilder: + """ + Provides operations to manage the axes property of the microsoft.graph.workbookChart entity. + """ + from .axes.axes_request_builder import AxesRequestBuilder + + return AxesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def data_labels(self) -> DataLabelsRequestBuilder: + """ + Provides operations to manage the dataLabels property of the microsoft.graph.workbookChart entity. + """ + from .data_labels.data_labels_request_builder import DataLabelsRequestBuilder + + return DataLabelsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChart entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def image(self) -> ImageRequestBuilder: + """ + Provides operations to call the image method. + """ + from .image.image_request_builder import ImageRequestBuilder + + return ImageRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def legend(self) -> LegendRequestBuilder: + """ + Provides operations to manage the legend property of the microsoft.graph.workbookChart entity. + """ + from .legend.legend_request_builder import LegendRequestBuilder + + return LegendRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def series(self) -> SeriesRequestBuilder: + """ + Provides operations to manage the series property of the microsoft.graph.workbookChart entity. + """ + from .series.series_request_builder import SeriesRequestBuilder + + return SeriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_data(self) -> SetDataRequestBuilder: + """ + Provides operations to call the setData method. + """ + from .set_data.set_data_request_builder import SetDataRequestBuilder + + return SetDataRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_position(self) -> SetPositionRequestBuilder: + """ + Provides operations to call the setPosition method. + """ + from .set_position.set_position_request_builder import SetPositionRequestBuilder + + return SetPositionRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def title(self) -> TitleRequestBuilder: + """ + Provides operations to manage the title property of the microsoft.graph.workbookChart entity. + """ + from .title.title_request_builder import TitleRequestBuilder + + return TitleRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheet(self) -> WorksheetRequestBuilder: + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookChart entity. + """ + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + + return WorksheetRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookChartItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookChartItemRequestBuilderGetQueryParameters(): + """ + Returns collection of charts that are part of the worksheet. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookChartItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookChartItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookChartItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/worksheet/worksheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..f96aec385f2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item/worksheet/worksheet_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_worksheet import WorkbookWorksheet + +class WorksheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/{workbookChart%2Did}/worksheet{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + The worksheet containing the current chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The worksheet containing the current chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> WorksheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorksheetRequestBuilderGetQueryParameters(): + """ + The worksheet containing the current chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/axes/axes_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/axes/axes_request_builder.py new file mode 100644 index 00000000000..7726d6d76e7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/axes/axes_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_axes import WorkbookChartAxes + +class AxesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the axes property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AxesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/axes{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property axes for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[AxesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxes]: + """ + Represents chart axes. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxes] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_axes import WorkbookChartAxes + + return await self.request_adapter.send_async(request_info, WorkbookChartAxes, error_mapping) + + async def patch(self,body: WorkbookChartAxes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxes]: + """ + Update the navigation property axes in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxes] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_axes import WorkbookChartAxes + + return await self.request_adapter.send_async(request_info, WorkbookChartAxes, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property axes for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AxesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart axes. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property axes in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AxesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AxesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AxesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AxesRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AxesRequestBuilderGetQueryParameters(): + """ + Represents chart axes. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class AxesRequestBuilderGetRequestConfiguration(RequestConfiguration[AxesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AxesRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/data_labels/data_labels_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/data_labels/data_labels_request_builder.py new file mode 100644 index 00000000000..c42a6fa8043 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/data_labels/data_labels_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_data_labels import WorkbookChartDataLabels + +class DataLabelsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the dataLabels property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataLabelsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/dataLabels{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property dataLabels for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[DataLabelsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartDataLabels]: + """ + Represents the data labels on the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabels] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_data_labels import WorkbookChartDataLabels + + return await self.request_adapter.send_async(request_info, WorkbookChartDataLabels, error_mapping) + + async def patch(self,body: WorkbookChartDataLabels, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartDataLabels]: + """ + Update the navigation property dataLabels in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabels] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_data_labels import WorkbookChartDataLabels + + return await self.request_adapter.send_async(request_info, WorkbookChartDataLabels, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property dataLabels for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DataLabelsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the data labels on the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartDataLabels, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property dataLabels in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DataLabelsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataLabelsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataLabelsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DataLabelsRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DataLabelsRequestBuilderGetQueryParameters(): + """ + Represents the data labels on the chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DataLabelsRequestBuilderGetRequestConfiguration(RequestConfiguration[DataLabelsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DataLabelsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/format/format_request_builder.py new file mode 100644 index 00000000000..dda7f38f246 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/format/format_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_area_format import WorkbookChartAreaFormat + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAreaFormat]: + """ + Encapsulates the format properties for the chart area. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAreaFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_area_format import WorkbookChartAreaFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAreaFormat, error_mapping) + + async def patch(self,body: WorkbookChartAreaFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAreaFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAreaFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_area_format import WorkbookChartAreaFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAreaFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Encapsulates the format properties for the chart area. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAreaFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Encapsulates the format properties for the chart area. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_get_response.py new file mode 100644 index 00000000000..95b4b9c482c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_request_builder.py new file mode 100644 index 00000000000..00d6dda66a4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image/image_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_get_response import ImageGetResponse + +class ImageRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImageRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/image()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_get_response import ImageGetResponse + + return await self.request_adapter.send_async(request_info, ImageGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_get_response.py new file mode 100644 index 00000000000..548984ccb1c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageWithWidthGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageWithWidthGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageWithWidthGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageWithWidthGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_request_builder.py new file mode 100644 index 00000000000..f02a744bb92 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width/image_with_width_request_builder.py @@ -0,0 +1,83 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_with_width_get_response import ImageWithWidthGetResponse + +class ImageWithWidthRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], width: Optional[int] = None) -> None: + """ + Instantiates a new ImageWithWidthRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param width: Usage: width={width} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['width'] = str(width) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/image(width={width})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageWithWidthGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageWithWidthGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_with_width_get_response import ImageWithWidthGetResponse + + return await self.request_adapter.send_async(request_info, ImageWithWidthGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageWithWidthRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageWithWidthRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageWithWidthRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageWithWidthRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height/image_with_width_with_height_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height/image_with_width_with_height_get_response.py new file mode 100644 index 00000000000..b9a6dc30fd4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height/image_with_width_with_height_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageWithWidthWithHeightGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageWithWidthWithHeightGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageWithWidthWithHeightGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageWithWidthWithHeightGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height/image_with_width_with_height_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height/image_with_width_with_height_request_builder.py new file mode 100644 index 00000000000..356b352efc2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height/image_with_width_with_height_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_with_width_with_height_get_response import ImageWithWidthWithHeightGetResponse + +class ImageWithWidthWithHeightRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], height: Optional[int] = None, width: Optional[int] = None) -> None: + """ + Instantiates a new ImageWithWidthWithHeightRequestBuilder and sets the default values. + param height: Usage: height={height} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param width: Usage: width={width} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['height'] = str(height) + path_parameters['width'] = str(width) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/image(width={width},height={height})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageWithWidthWithHeightGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageWithWidthWithHeightGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_with_width_with_height_get_response import ImageWithWidthWithHeightGetResponse + + return await self.request_adapter.send_async(request_info, ImageWithWidthWithHeightGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageWithWidthWithHeightRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageWithWidthWithHeightRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageWithWidthWithHeightRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py new file mode 100644 index 00000000000..a41138e8e05 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageWithWidthWithHeightWithFittingModeGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageWithWidthWithHeightWithFittingModeGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageWithWidthWithHeightWithFittingModeGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageWithWidthWithHeightWithFittingModeGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py new file mode 100644 index 00000000000..678c6d37429 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py @@ -0,0 +1,87 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_with_width_with_height_with_fitting_mode_get_response import ImageWithWidthWithHeightWithFittingModeGetResponse + +class ImageWithWidthWithHeightWithFittingModeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], fitting_mode: Optional[str] = None, height: Optional[int] = None, width: Optional[int] = None) -> None: + """ + Instantiates a new ImageWithWidthWithHeightWithFittingModeRequestBuilder and sets the default values. + param fitting_mode: Usage: fittingMode='{fittingMode}' + param height: Usage: height={height} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param width: Usage: width={width} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['fittingMode'] = str(fitting_mode) + path_parameters['height'] = str(height) + path_parameters['width'] = str(width) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/image(width={width},height={height},fittingMode='{fittingMode}')", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageWithWidthWithHeightWithFittingModeGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageWithWidthWithHeightWithFittingModeGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_with_width_with_height_with_fitting_mode_get_response import ImageWithWidthWithHeightWithFittingModeGetResponse + + return await self.request_adapter.send_async(request_info, ImageWithWidthWithHeightWithFittingModeGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageWithWidthWithHeightWithFittingModeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageWithWidthWithHeightWithFittingModeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageWithWidthWithHeightWithFittingModeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/item_at_with_index_request_builder.py new file mode 100644 index 00000000000..7134d5c142a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/item_at_with_index_request_builder.py @@ -0,0 +1,232 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_chart import WorkbookChart + from .axes.axes_request_builder import AxesRequestBuilder + from .data_labels.data_labels_request_builder import DataLabelsRequestBuilder + from .format.format_request_builder import FormatRequestBuilder + from .image.image_request_builder import ImageRequestBuilder + from .image_with_width.image_with_width_request_builder import ImageWithWidthRequestBuilder + from .image_with_width_with_height.image_with_width_with_height_request_builder import ImageWithWidthWithHeightRequestBuilder + from .image_with_width_with_height_with_fitting_mode.image_with_width_with_height_with_fitting_mode_request_builder import ImageWithWidthWithHeightWithFittingModeRequestBuilder + from .legend.legend_request_builder import LegendRequestBuilder + from .series.series_request_builder import SeriesRequestBuilder + from .set_data.set_data_request_builder import SetDataRequestBuilder + from .set_position.set_position_request_builder import SetPositionRequestBuilder + from .title.title_request_builder import TitleRequestBuilder + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + +class ItemAtWithIndexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the itemAt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], index: Optional[int] = None) -> None: + """ + Instantiates a new ItemAtWithIndexRequestBuilder and sets the default values. + param index: Usage: index={index} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChart]: + """ + Gets a chart based on its position in the collection. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChart] + Find more info here: https://learn.microsoft.com/graph/api/chartcollection-itemat?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_chart import WorkbookChart + + return await self.request_adapter.send_async(request_info, WorkbookChart, error_mapping) + + def image_with_width(self,width: int) -> ImageWithWidthRequestBuilder: + """ + Provides operations to call the image method. + param width: Usage: width={width} + Returns: ImageWithWidthRequestBuilder + """ + if not width: + raise TypeError("width cannot be null.") + from .image_with_width.image_with_width_request_builder import ImageWithWidthRequestBuilder + + return ImageWithWidthRequestBuilder(self.request_adapter, self.path_parameters, width) + + def image_with_width_with_height(self,height: int, width: int) -> ImageWithWidthWithHeightRequestBuilder: + """ + Provides operations to call the image method. + param height: Usage: height={height} + param width: Usage: width={width} + Returns: ImageWithWidthWithHeightRequestBuilder + """ + if not height: + raise TypeError("height cannot be null.") + if not width: + raise TypeError("width cannot be null.") + from .image_with_width_with_height.image_with_width_with_height_request_builder import ImageWithWidthWithHeightRequestBuilder + + return ImageWithWidthWithHeightRequestBuilder(self.request_adapter, self.path_parameters, height, width) + + def image_with_width_with_height_with_fitting_mode(self,fitting_mode: str, height: int, width: int) -> ImageWithWidthWithHeightWithFittingModeRequestBuilder: + """ + Provides operations to call the image method. + param fitting_mode: Usage: fittingMode='{fittingMode}' + param height: Usage: height={height} + param width: Usage: width={width} + Returns: ImageWithWidthWithHeightWithFittingModeRequestBuilder + """ + if not fitting_mode: + raise TypeError("fitting_mode cannot be null.") + if not height: + raise TypeError("height cannot be null.") + if not width: + raise TypeError("width cannot be null.") + from .image_with_width_with_height_with_fitting_mode.image_with_width_with_height_with_fitting_mode_request_builder import ImageWithWidthWithHeightWithFittingModeRequestBuilder + + return ImageWithWidthWithHeightWithFittingModeRequestBuilder(self.request_adapter, self.path_parameters, fitting_mode, height, width) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets a chart based on its position in the collection. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ItemAtWithIndexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemAtWithIndexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemAtWithIndexRequestBuilder(self.request_adapter, raw_url) + + @property + def axes(self) -> AxesRequestBuilder: + """ + Provides operations to manage the axes property of the microsoft.graph.workbookChart entity. + """ + from .axes.axes_request_builder import AxesRequestBuilder + + return AxesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def data_labels(self) -> DataLabelsRequestBuilder: + """ + Provides operations to manage the dataLabels property of the microsoft.graph.workbookChart entity. + """ + from .data_labels.data_labels_request_builder import DataLabelsRequestBuilder + + return DataLabelsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChart entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def image(self) -> ImageRequestBuilder: + """ + Provides operations to call the image method. + """ + from .image.image_request_builder import ImageRequestBuilder + + return ImageRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def legend(self) -> LegendRequestBuilder: + """ + Provides operations to manage the legend property of the microsoft.graph.workbookChart entity. + """ + from .legend.legend_request_builder import LegendRequestBuilder + + return LegendRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def series(self) -> SeriesRequestBuilder: + """ + Provides operations to manage the series property of the microsoft.graph.workbookChart entity. + """ + from .series.series_request_builder import SeriesRequestBuilder + + return SeriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_data(self) -> SetDataRequestBuilder: + """ + Provides operations to call the setData method. + """ + from .set_data.set_data_request_builder import SetDataRequestBuilder + + return SetDataRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_position(self) -> SetPositionRequestBuilder: + """ + Provides operations to call the setPosition method. + """ + from .set_position.set_position_request_builder import SetPositionRequestBuilder + + return SetPositionRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def title(self) -> TitleRequestBuilder: + """ + Provides operations to manage the title property of the microsoft.graph.workbookChart entity. + """ + from .title.title_request_builder import TitleRequestBuilder + + return TitleRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheet(self) -> WorksheetRequestBuilder: + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookChart entity. + """ + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + + return WorksheetRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemAtWithIndexRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/legend/legend_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/legend/legend_request_builder.py new file mode 100644 index 00000000000..9b114cf616e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/legend/legend_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_legend import WorkbookChartLegend + +class LegendRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the legend property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LegendRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/legend{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property legend for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LegendRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLegend]: + """ + Represents the legend for the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegend] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_legend import WorkbookChartLegend + + return await self.request_adapter.send_async(request_info, WorkbookChartLegend, error_mapping) + + async def patch(self,body: WorkbookChartLegend, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLegend]: + """ + Update the navigation property legend in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegend] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_legend import WorkbookChartLegend + + return await self.request_adapter.send_async(request_info, WorkbookChartLegend, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property legend for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LegendRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the legend for the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLegend, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property legend in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LegendRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LegendRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LegendRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LegendRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LegendRequestBuilderGetQueryParameters(): + """ + Represents the legend for the chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LegendRequestBuilderGetRequestConfiguration(RequestConfiguration[LegendRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LegendRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/series/series_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/series/series_request_builder.py new file mode 100644 index 00000000000..ca7d9eb3375 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/series/series_request_builder.py @@ -0,0 +1,182 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_series import WorkbookChartSeries + from ..............models.workbook_chart_series_collection_response import WorkbookChartSeriesCollectionResponse + +class SeriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the series property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SeriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/series{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[SeriesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartSeriesCollectionResponse]: + """ + Represents either a single series or collection of series in the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeriesCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_series_collection_response import WorkbookChartSeriesCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookChartSeriesCollectionResponse, error_mapping) + + async def post(self,body: WorkbookChartSeries, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartSeries]: + """ + Create new navigation property to series for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeries] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_series import WorkbookChartSeries + + return await self.request_adapter.send_async(request_info, WorkbookChartSeries, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SeriesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents either a single series or collection of series in the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookChartSeries, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to series for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SeriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SeriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SeriesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SeriesRequestBuilderGetQueryParameters(): + """ + Represents either a single series or collection of series in the chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class SeriesRequestBuilderGetRequestConfiguration(RequestConfiguration[SeriesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SeriesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_post_request_body.py new file mode 100644 index 00000000000..73f33ad1199 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..............models.json import Json + +@dataclass +class SetDataPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The seriesBy property + series_by: Optional[str] = None + # The sourceData property + source_data: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetDataPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetDataPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetDataPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..............models.json import Json + + from ..............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "seriesBy": lambda n : setattr(self, 'series_by', n.get_str_value()), + "sourceData": lambda n : setattr(self, 'source_data', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("seriesBy", self.series_by) + writer.write_object_value("sourceData", self.source_data) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_request_builder.py new file mode 100644 index 00000000000..4892bce386a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_data/set_data_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .set_data_post_request_body import SetDataPostRequestBody + +class SetDataRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setData method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetDataRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/setData", path_parameters) + + async def post(self,body: SetDataPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Resets the source data for the chart. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chart-setdata?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetDataPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Resets the source data for the chart. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetDataRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetDataRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetDataRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetDataRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_post_request_body.py new file mode 100644 index 00000000000..0efc303fdaa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..............models.json import Json + +@dataclass +class SetPositionPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The endCell property + end_cell: Optional[Json] = None + # The startCell property + start_cell: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetPositionPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetPositionPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetPositionPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..............models.json import Json + + from ..............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "endCell": lambda n : setattr(self, 'end_cell', n.get_object_value(Json)), + "startCell": lambda n : setattr(self, 'start_cell', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("endCell", self.end_cell) + writer.write_object_value("startCell", self.start_cell) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_request_builder.py new file mode 100644 index 00000000000..b69d18e67c4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/set_position/set_position_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .set_position_post_request_body import SetPositionPostRequestBody + +class SetPositionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setPosition method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetPositionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/setPosition", path_parameters) + + async def post(self,body: SetPositionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Positions the chart relative to cells on the worksheet. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chart-setposition?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetPositionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Positions the chart relative to cells on the worksheet. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetPositionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetPositionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetPositionRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetPositionRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/title/title_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/title/title_request_builder.py new file mode 100644 index 00000000000..a01de475d8b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/title/title_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_title import WorkbookChartTitle + +class TitleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the title property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TitleRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/title{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartTitle]: + """ + Represents the title of the specified chart, including the text, visibility, position and formatting of the title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitle] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_title import WorkbookChartTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartTitle, error_mapping) + + async def patch(self,body: WorkbookChartTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartTitle]: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitle] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_title import WorkbookChartTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartTitle, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the title of the specified chart, including the text, visibility, position and formatting of the title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TitleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TitleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TitleRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TitleRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderGetQueryParameters(): + """ + Represents the title of the specified chart, including the text, visibility, position and formatting of the title. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class TitleRequestBuilderGetRequestConfiguration(RequestConfiguration[TitleRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/worksheet/worksheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..56ee7576b6c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_at_with_index/worksheet/worksheet_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_worksheet import WorkbookWorksheet + +class WorksheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/itemAt(index={index})/worksheet{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + The worksheet containing the current chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The worksheet containing the current chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> WorksheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorksheetRequestBuilderGetQueryParameters(): + """ + The worksheet containing the current chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/axes/axes_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/axes/axes_request_builder.py new file mode 100644 index 00000000000..b6cfd581a07 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/axes/axes_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_axes import WorkbookChartAxes + +class AxesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the axes property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AxesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/axes{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property axes for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[AxesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAxes]: + """ + Represents chart axes. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxes] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_axes import WorkbookChartAxes + + return await self.request_adapter.send_async(request_info, WorkbookChartAxes, error_mapping) + + async def patch(self,body: WorkbookChartAxes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAxes]: + """ + Update the navigation property axes in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAxes] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_axes import WorkbookChartAxes + + return await self.request_adapter.send_async(request_info, WorkbookChartAxes, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property axes for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AxesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents chart axes. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAxes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property axes in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AxesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AxesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AxesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AxesRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AxesRequestBuilderGetQueryParameters(): + """ + Represents chart axes. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class AxesRequestBuilderGetRequestConfiguration(RequestConfiguration[AxesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class AxesRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/data_labels/data_labels_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/data_labels/data_labels_request_builder.py new file mode 100644 index 00000000000..3b46e8c7c06 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/data_labels/data_labels_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_data_labels import WorkbookChartDataLabels + +class DataLabelsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the dataLabels property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataLabelsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/dataLabels{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property dataLabels for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[DataLabelsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartDataLabels]: + """ + Represents the data labels on the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabels] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_data_labels import WorkbookChartDataLabels + + return await self.request_adapter.send_async(request_info, WorkbookChartDataLabels, error_mapping) + + async def patch(self,body: WorkbookChartDataLabels, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartDataLabels]: + """ + Update the navigation property dataLabels in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartDataLabels] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_data_labels import WorkbookChartDataLabels + + return await self.request_adapter.send_async(request_info, WorkbookChartDataLabels, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property dataLabels for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DataLabelsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the data labels on the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartDataLabels, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property dataLabels in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DataLabelsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataLabelsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataLabelsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DataLabelsRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DataLabelsRequestBuilderGetQueryParameters(): + """ + Represents the data labels on the chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DataLabelsRequestBuilderGetRequestConfiguration(RequestConfiguration[DataLabelsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DataLabelsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/format/format_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/format/format_request_builder.py new file mode 100644 index 00000000000..428955e4e7f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/format/format_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_area_format import WorkbookChartAreaFormat + +class FormatRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the format property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FormatRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/format{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartAreaFormat]: + """ + Encapsulates the format properties for the chart area. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAreaFormat] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_area_format import WorkbookChartAreaFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAreaFormat, error_mapping) + + async def patch(self,body: WorkbookChartAreaFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartAreaFormat]: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartAreaFormat] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_area_format import WorkbookChartAreaFormat + + return await self.request_adapter.send_async(request_info, WorkbookChartAreaFormat, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property format for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FormatRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Encapsulates the format properties for the chart area. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartAreaFormat, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property format in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FormatRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FormatRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FormatRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FormatRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderGetQueryParameters(): + """ + Encapsulates the format properties for the chart area. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FormatRequestBuilderGetRequestConfiguration(RequestConfiguration[FormatRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FormatRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image/image_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image/image_get_response.py new file mode 100644 index 00000000000..95b4b9c482c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image/image_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image/image_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image/image_request_builder.py new file mode 100644 index 00000000000..7cd54819d6e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image/image_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_get_response import ImageGetResponse + +class ImageRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ImageRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/image()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_get_response import ImageGetResponse + + return await self.request_adapter.send_async(request_info, ImageGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_get_response.py new file mode 100644 index 00000000000..548984ccb1c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageWithWidthGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageWithWidthGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageWithWidthGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageWithWidthGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_request_builder.py new file mode 100644 index 00000000000..ddc7b739d93 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width/image_with_width_request_builder.py @@ -0,0 +1,83 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_with_width_get_response import ImageWithWidthGetResponse + +class ImageWithWidthRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], width: Optional[int] = None) -> None: + """ + Instantiates a new ImageWithWidthRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param width: Usage: width={width} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['width'] = str(width) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/image(width={width})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageWithWidthGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageWithWidthGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_with_width_get_response import ImageWithWidthGetResponse + + return await self.request_adapter.send_async(request_info, ImageWithWidthGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageWithWidthRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageWithWidthRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageWithWidthRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageWithWidthRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height/image_with_width_with_height_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height/image_with_width_with_height_get_response.py new file mode 100644 index 00000000000..b9a6dc30fd4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height/image_with_width_with_height_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageWithWidthWithHeightGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageWithWidthWithHeightGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageWithWidthWithHeightGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageWithWidthWithHeightGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height/image_with_width_with_height_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height/image_with_width_with_height_request_builder.py new file mode 100644 index 00000000000..d5dea9e726a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height/image_with_width_with_height_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_with_width_with_height_get_response import ImageWithWidthWithHeightGetResponse + +class ImageWithWidthWithHeightRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], height: Optional[int] = None, width: Optional[int] = None) -> None: + """ + Instantiates a new ImageWithWidthWithHeightRequestBuilder and sets the default values. + param height: Usage: height={height} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param width: Usage: width={width} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['height'] = str(height) + path_parameters['width'] = str(width) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/image(width={width},height={height})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageWithWidthWithHeightGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageWithWidthWithHeightGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_with_width_with_height_get_response import ImageWithWidthWithHeightGetResponse + + return await self.request_adapter.send_async(request_info, ImageWithWidthWithHeightGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageWithWidthWithHeightRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageWithWidthWithHeightRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageWithWidthWithHeightRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageWithWidthWithHeightRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py new file mode 100644 index 00000000000..a41138e8e05 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ImageWithWidthWithHeightWithFittingModeGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ImageWithWidthWithHeightWithFittingModeGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ImageWithWidthWithHeightWithFittingModeGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ImageWithWidthWithHeightWithFittingModeGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py new file mode 100644 index 00000000000..c7afaa6bae4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/image_with_width_with_height_with_fitting_mode/image_with_width_with_height_with_fitting_mode_request_builder.py @@ -0,0 +1,87 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .image_with_width_with_height_with_fitting_mode_get_response import ImageWithWidthWithHeightWithFittingModeGetResponse + +class ImageWithWidthWithHeightWithFittingModeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the image method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], fitting_mode: Optional[str] = None, height: Optional[int] = None, width: Optional[int] = None) -> None: + """ + Instantiates a new ImageWithWidthWithHeightWithFittingModeRequestBuilder and sets the default values. + param fitting_mode: Usage: fittingMode='{fittingMode}' + param height: Usage: height={height} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param width: Usage: width={width} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['fittingMode'] = str(fitting_mode) + path_parameters['height'] = str(height) + path_parameters['width'] = str(width) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/image(width={width},height={height},fittingMode='{fittingMode}')", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ImageWithWidthWithHeightWithFittingModeGetResponse]: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ImageWithWidthWithHeightWithFittingModeGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .image_with_width_with_height_with_fitting_mode_get_response import ImageWithWidthWithHeightWithFittingModeGetResponse + + return await self.request_adapter.send_async(request_info, ImageWithWidthWithHeightWithFittingModeGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function image + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ImageWithWidthWithHeightWithFittingModeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ImageWithWidthWithHeightWithFittingModeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ImageWithWidthWithHeightWithFittingModeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ImageWithWidthWithHeightWithFittingModeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/item_with_name_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/item_with_name_request_builder.py new file mode 100644 index 00000000000..fc9bb30ddeb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/item_with_name_request_builder.py @@ -0,0 +1,231 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_chart import WorkbookChart + from .axes.axes_request_builder import AxesRequestBuilder + from .data_labels.data_labels_request_builder import DataLabelsRequestBuilder + from .format.format_request_builder import FormatRequestBuilder + from .image.image_request_builder import ImageRequestBuilder + from .image_with_width.image_with_width_request_builder import ImageWithWidthRequestBuilder + from .image_with_width_with_height.image_with_width_with_height_request_builder import ImageWithWidthWithHeightRequestBuilder + from .image_with_width_with_height_with_fitting_mode.image_with_width_with_height_with_fitting_mode_request_builder import ImageWithWidthWithHeightWithFittingModeRequestBuilder + from .legend.legend_request_builder import LegendRequestBuilder + from .series.series_request_builder import SeriesRequestBuilder + from .set_data.set_data_request_builder import SetDataRequestBuilder + from .set_position.set_position_request_builder import SetPositionRequestBuilder + from .title.title_request_builder import TitleRequestBuilder + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + +class ItemWithNameRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the item method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], name: Optional[str] = None) -> None: + """ + Instantiates a new ItemWithNameRequestBuilder and sets the default values. + param name: Usage: name='{name}' + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['name'] = str(name) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChart]: + """ + Invoke function item + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChart] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_chart import WorkbookChart + + return await self.request_adapter.send_async(request_info, WorkbookChart, error_mapping) + + def image_with_width(self,width: int) -> ImageWithWidthRequestBuilder: + """ + Provides operations to call the image method. + param width: Usage: width={width} + Returns: ImageWithWidthRequestBuilder + """ + if not width: + raise TypeError("width cannot be null.") + from .image_with_width.image_with_width_request_builder import ImageWithWidthRequestBuilder + + return ImageWithWidthRequestBuilder(self.request_adapter, self.path_parameters, width) + + def image_with_width_with_height(self,height: int, width: int) -> ImageWithWidthWithHeightRequestBuilder: + """ + Provides operations to call the image method. + param height: Usage: height={height} + param width: Usage: width={width} + Returns: ImageWithWidthWithHeightRequestBuilder + """ + if not height: + raise TypeError("height cannot be null.") + if not width: + raise TypeError("width cannot be null.") + from .image_with_width_with_height.image_with_width_with_height_request_builder import ImageWithWidthWithHeightRequestBuilder + + return ImageWithWidthWithHeightRequestBuilder(self.request_adapter, self.path_parameters, height, width) + + def image_with_width_with_height_with_fitting_mode(self,fitting_mode: str, height: int, width: int) -> ImageWithWidthWithHeightWithFittingModeRequestBuilder: + """ + Provides operations to call the image method. + param fitting_mode: Usage: fittingMode='{fittingMode}' + param height: Usage: height={height} + param width: Usage: width={width} + Returns: ImageWithWidthWithHeightWithFittingModeRequestBuilder + """ + if not fitting_mode: + raise TypeError("fitting_mode cannot be null.") + if not height: + raise TypeError("height cannot be null.") + if not width: + raise TypeError("width cannot be null.") + from .image_with_width_with_height_with_fitting_mode.image_with_width_with_height_with_fitting_mode_request_builder import ImageWithWidthWithHeightWithFittingModeRequestBuilder + + return ImageWithWidthWithHeightWithFittingModeRequestBuilder(self.request_adapter, self.path_parameters, fitting_mode, height, width) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function item + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ItemWithNameRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemWithNameRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemWithNameRequestBuilder(self.request_adapter, raw_url) + + @property + def axes(self) -> AxesRequestBuilder: + """ + Provides operations to manage the axes property of the microsoft.graph.workbookChart entity. + """ + from .axes.axes_request_builder import AxesRequestBuilder + + return AxesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def data_labels(self) -> DataLabelsRequestBuilder: + """ + Provides operations to manage the dataLabels property of the microsoft.graph.workbookChart entity. + """ + from .data_labels.data_labels_request_builder import DataLabelsRequestBuilder + + return DataLabelsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def format(self) -> FormatRequestBuilder: + """ + Provides operations to manage the format property of the microsoft.graph.workbookChart entity. + """ + from .format.format_request_builder import FormatRequestBuilder + + return FormatRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def image(self) -> ImageRequestBuilder: + """ + Provides operations to call the image method. + """ + from .image.image_request_builder import ImageRequestBuilder + + return ImageRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def legend(self) -> LegendRequestBuilder: + """ + Provides operations to manage the legend property of the microsoft.graph.workbookChart entity. + """ + from .legend.legend_request_builder import LegendRequestBuilder + + return LegendRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def series(self) -> SeriesRequestBuilder: + """ + Provides operations to manage the series property of the microsoft.graph.workbookChart entity. + """ + from .series.series_request_builder import SeriesRequestBuilder + + return SeriesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_data(self) -> SetDataRequestBuilder: + """ + Provides operations to call the setData method. + """ + from .set_data.set_data_request_builder import SetDataRequestBuilder + + return SetDataRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def set_position(self) -> SetPositionRequestBuilder: + """ + Provides operations to call the setPosition method. + """ + from .set_position.set_position_request_builder import SetPositionRequestBuilder + + return SetPositionRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def title(self) -> TitleRequestBuilder: + """ + Provides operations to manage the title property of the microsoft.graph.workbookChart entity. + """ + from .title.title_request_builder import TitleRequestBuilder + + return TitleRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheet(self) -> WorksheetRequestBuilder: + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookChart entity. + """ + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + + return WorksheetRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemWithNameRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/legend/legend_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/legend/legend_request_builder.py new file mode 100644 index 00000000000..ce654aca63b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/legend/legend_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_legend import WorkbookChartLegend + +class LegendRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the legend property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LegendRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/legend{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property legend for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[LegendRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartLegend]: + """ + Represents the legend for the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegend] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_legend import WorkbookChartLegend + + return await self.request_adapter.send_async(request_info, WorkbookChartLegend, error_mapping) + + async def patch(self,body: WorkbookChartLegend, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartLegend]: + """ + Update the navigation property legend in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartLegend] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_legend import WorkbookChartLegend + + return await self.request_adapter.send_async(request_info, WorkbookChartLegend, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property legend for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LegendRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the legend for the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartLegend, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property legend in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> LegendRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LegendRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LegendRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class LegendRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LegendRequestBuilderGetQueryParameters(): + """ + Represents the legend for the chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LegendRequestBuilderGetRequestConfiguration(RequestConfiguration[LegendRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class LegendRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/series/series_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/series/series_request_builder.py new file mode 100644 index 00000000000..8e167767d58 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/series/series_request_builder.py @@ -0,0 +1,182 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_series import WorkbookChartSeries + from ..............models.workbook_chart_series_collection_response import WorkbookChartSeriesCollectionResponse + +class SeriesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the series property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SeriesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/series{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[SeriesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartSeriesCollectionResponse]: + """ + Represents either a single series or collection of series in the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeriesCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_series_collection_response import WorkbookChartSeriesCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookChartSeriesCollectionResponse, error_mapping) + + async def post(self,body: WorkbookChartSeries, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartSeries]: + """ + Create new navigation property to series for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartSeries] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_series import WorkbookChartSeries + + return await self.request_adapter.send_async(request_info, WorkbookChartSeries, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SeriesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents either a single series or collection of series in the chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookChartSeries, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to series for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SeriesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SeriesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SeriesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SeriesRequestBuilderGetQueryParameters(): + """ + Represents either a single series or collection of series in the chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class SeriesRequestBuilderGetRequestConfiguration(RequestConfiguration[SeriesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SeriesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_post_request_body.py new file mode 100644 index 00000000000..73f33ad1199 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..............models.json import Json + +@dataclass +class SetDataPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The seriesBy property + series_by: Optional[str] = None + # The sourceData property + source_data: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetDataPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetDataPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetDataPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..............models.json import Json + + from ..............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "seriesBy": lambda n : setattr(self, 'series_by', n.get_str_value()), + "sourceData": lambda n : setattr(self, 'source_data', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("seriesBy", self.series_by) + writer.write_object_value("sourceData", self.source_data) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_request_builder.py new file mode 100644 index 00000000000..77e182c625c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_data/set_data_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .set_data_post_request_body import SetDataPostRequestBody + +class SetDataRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setData method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetDataRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/setData", path_parameters) + + async def post(self,body: SetDataPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Resets the source data for the chart. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chart-setdata?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetDataPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Resets the source data for the chart. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetDataRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetDataRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetDataRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetDataRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_post_request_body.py new file mode 100644 index 00000000000..0efc303fdaa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..............models.json import Json + +@dataclass +class SetPositionPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The endCell property + end_cell: Optional[Json] = None + # The startCell property + start_cell: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SetPositionPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SetPositionPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SetPositionPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..............models.json import Json + + from ..............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "endCell": lambda n : setattr(self, 'end_cell', n.get_object_value(Json)), + "startCell": lambda n : setattr(self, 'start_cell', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("endCell", self.end_cell) + writer.write_object_value("startCell", self.start_cell) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_request_builder.py new file mode 100644 index 00000000000..7ed05a324ef --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/set_position/set_position_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from .set_position_post_request_body import SetPositionPostRequestBody + +class SetPositionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the setPosition method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SetPositionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/setPosition", path_parameters) + + async def post(self,body: SetPositionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Positions the chart relative to cells on the worksheet. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/chart-setposition?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: SetPositionPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Positions the chart relative to cells on the worksheet. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SetPositionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SetPositionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SetPositionRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SetPositionRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/title/title_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/title/title_request_builder.py new file mode 100644 index 00000000000..97d4be2a62c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/title/title_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_chart_title import WorkbookChartTitle + +class TitleRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the title property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TitleRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/title{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookChartTitle]: + """ + Represents the title of the specified chart, including the text, visibility, position and formatting of the title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitle] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_title import WorkbookChartTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartTitle, error_mapping) + + async def patch(self,body: WorkbookChartTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookChartTitle]: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookChartTitle] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_chart_title import WorkbookChartTitle + + return await self.request_adapter.send_async(request_info, WorkbookChartTitle, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property title for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[TitleRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the title of the specified chart, including the text, visibility, position and formatting of the title. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookChartTitle, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property title in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TitleRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TitleRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TitleRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TitleRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderGetQueryParameters(): + """ + Represents the title of the specified chart, including the text, visibility, position and formatting of the title. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class TitleRequestBuilderGetRequestConfiguration(RequestConfiguration[TitleRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TitleRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/worksheet/worksheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..ee2ad8babb6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/charts/item_with_name/worksheet/worksheet_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_worksheet import WorkbookWorksheet + +class WorksheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookChart entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/charts/item(name='{name}')/worksheet{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + The worksheet containing the current chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The worksheet containing the current chart. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> WorksheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorksheetRequestBuilderGetQueryParameters(): + """ + The worksheet containing the current chart. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add/add_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add/add_post_request_body.py new file mode 100644 index 00000000000..ca450c8e03f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add/add_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .............models.json import Json + +@dataclass +class AddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The comment property + comment: Optional[str] = None + # The name property + name: Optional[str] = None + # The reference property + reference: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .............models.json import Json + + from .............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "comment": lambda n : setattr(self, 'comment', n.get_str_value()), + "name": lambda n : setattr(self, 'name', n.get_str_value()), + "reference": lambda n : setattr(self, 'reference', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("comment", self.comment) + writer.write_str_value("name", self.name) + writer.write_object_value("reference", self.reference) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add/add_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add/add_request_builder.py new file mode 100644 index 00000000000..63336f5e91b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add/add_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_named_item import WorkbookNamedItem + from .add_post_request_body import AddPostRequestBody + +class AddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the add method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/names/add", path_parameters) + + async def post(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookNamedItem]: + """ + Adds a new name to the collection of the given scope using the user's locale for the formula. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItem] + Find more info here: https://learn.microsoft.com/graph/api/nameditem-add?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_named_item import WorkbookNamedItem + + return await self.request_adapter.send_async(request_info, WorkbookNamedItem, error_mapping) + + def to_post_request_information(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Adds a new name to the collection of the given scope using the user's locale for the formula. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_post_request_body.py new file mode 100644 index 00000000000..b2983f9b488 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_post_request_body.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class AddFormulaLocalPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The comment property + comment: Optional[str] = None + # The formula property + formula: Optional[str] = None + # The name property + name: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddFormulaLocalPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddFormulaLocalPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddFormulaLocalPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "comment": lambda n : setattr(self, 'comment', n.get_str_value()), + "formula": lambda n : setattr(self, 'formula', n.get_str_value()), + "name": lambda n : setattr(self, 'name', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("comment", self.comment) + writer.write_str_value("formula", self.formula) + writer.write_str_value("name", self.name) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_request_builder.py new file mode 100644 index 00000000000..9e3fd82919c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/add_formula_local/add_formula_local_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_named_item import WorkbookNamedItem + from .add_formula_local_post_request_body import AddFormulaLocalPostRequestBody + +class AddFormulaLocalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the addFormulaLocal method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddFormulaLocalRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/names/addFormulaLocal", path_parameters) + + async def post(self,body: AddFormulaLocalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookNamedItem]: + """ + Adds a new name to the collection of the given scope using the user's locale for the formula. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItem] + Find more info here: https://learn.microsoft.com/graph/api/nameditem-addformulalocal?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_named_item import WorkbookNamedItem + + return await self.request_adapter.send_async(request_info, WorkbookNamedItem, error_mapping) + + def to_post_request_information(self,body: AddFormulaLocalPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Adds a new name to the collection of the given scope using the user's locale for the formula. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddFormulaLocalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddFormulaLocalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddFormulaLocalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddFormulaLocalRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/count/count_request_builder.py new file mode 100644 index 00000000000..c449a947bcf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/names/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/range/range_request_builder.py new file mode 100644 index 00000000000..44efd8be455 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/range/range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/names/{workbookNamedItem%2Did}/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/nameditem-range?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Returns the range object that is associated with the name. Throws an exception if the named item's type is not a range. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/workbook_named_item_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/workbook_named_item_item_request_builder.py new file mode 100644 index 00000000000..1ea6052ee52 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/workbook_named_item_item_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_named_item import WorkbookNamedItem + from .range.range_request_builder import RangeRequestBuilder + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + +class WorkbookNamedItemItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the names property of the microsoft.graph.workbookWorksheet entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookNamedItemItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/names/{workbookNamedItem%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property names for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookNamedItemItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookNamedItem]: + """ + Returns collection of names that are associated with the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_named_item import WorkbookNamedItem + + return await self.request_adapter.send_async(request_info, WorkbookNamedItem, error_mapping) + + async def patch(self,body: WorkbookNamedItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookNamedItem]: + """ + Update the navigation property names in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_named_item import WorkbookNamedItem + + return await self.request_adapter.send_async(request_info, WorkbookNamedItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property names for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookNamedItemItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns collection of names that are associated with the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookNamedItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property names in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookNamedItemItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookNamedItemItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookNamedItemItemRequestBuilder(self.request_adapter, raw_url) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheet(self) -> WorksheetRequestBuilder: + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookNamedItem entity. + """ + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + + return WorksheetRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookNamedItemItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookNamedItemItemRequestBuilderGetQueryParameters(): + """ + Returns collection of names that are associated with the worksheet. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookNamedItemItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookNamedItemItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookNamedItemItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/worksheet/worksheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..0ee0db24300 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/item/worksheet/worksheet_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_worksheet import WorkbookWorksheet + +class WorksheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookNamedItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/names/{workbookNamedItem%2Did}/worksheet{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> WorksheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorksheetRequestBuilderGetQueryParameters(): + """ + Returns the worksheet on which the named item is scoped to. Available only if the item is scoped to the worksheet. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/names_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/names_request_builder.py new file mode 100644 index 00000000000..50f7b6583ac --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/names/names_request_builder.py @@ -0,0 +1,227 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_named_item import WorkbookNamedItem + from ............models.workbook_named_item_collection_response import WorkbookNamedItemCollectionResponse + from .add.add_request_builder import AddRequestBuilder + from .add_formula_local.add_formula_local_request_builder import AddFormulaLocalRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_named_item_item_request_builder import WorkbookNamedItemItemRequestBuilder + +class NamesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the names property of the microsoft.graph.workbookWorksheet entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new NamesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/names{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_named_item_id(self,workbook_named_item_id: str) -> WorkbookNamedItemItemRequestBuilder: + """ + Provides operations to manage the names property of the microsoft.graph.workbookWorksheet entity. + param workbook_named_item_id: The unique identifier of workbookNamedItem + Returns: WorkbookNamedItemItemRequestBuilder + """ + if not workbook_named_item_id: + raise TypeError("workbook_named_item_id cannot be null.") + from .item.workbook_named_item_item_request_builder import WorkbookNamedItemItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookNamedItem%2Did"] = workbook_named_item_id + return WorkbookNamedItemItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[NamesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookNamedItemCollectionResponse]: + """ + Returns collection of names that are associated with the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_named_item_collection_response import WorkbookNamedItemCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookNamedItemCollectionResponse, error_mapping) + + async def post(self,body: WorkbookNamedItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookNamedItem]: + """ + Create new navigation property to names for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookNamedItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_named_item import WorkbookNamedItem + + return await self.request_adapter.send_async(request_info, WorkbookNamedItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[NamesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns collection of names that are associated with the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookNamedItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to names for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> NamesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: NamesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return NamesRequestBuilder(self.request_adapter, raw_url) + + @property + def add(self) -> AddRequestBuilder: + """ + Provides operations to call the add method. + """ + from .add.add_request_builder import AddRequestBuilder + + return AddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def add_formula_local(self) -> AddFormulaLocalRequestBuilder: + """ + Provides operations to call the addFormulaLocal method. + """ + from .add_formula_local.add_formula_local_request_builder import AddFormulaLocalRequestBuilder + + return AddFormulaLocalRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class NamesRequestBuilderGetQueryParameters(): + """ + Returns collection of names that are associated with the worksheet. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class NamesRequestBuilderGetRequestConfiguration(RequestConfiguration[NamesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class NamesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/count/count_request_builder.py new file mode 100644 index 00000000000..fb018311f95 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/pivotTables/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/refresh/refresh_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/refresh/refresh_request_builder.py new file mode 100644 index 00000000000..0a6c6933675 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/refresh/refresh_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + +class RefreshRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the refresh method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RefreshRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/pivotTables/{workbookPivotTable%2Did}/refresh", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Refreshes the PivotTable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/workbookpivottable-refresh?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Refreshes the PivotTable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RefreshRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RefreshRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RefreshRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RefreshRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/workbook_pivot_table_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/workbook_pivot_table_item_request_builder.py new file mode 100644 index 00000000000..4436909620c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/workbook_pivot_table_item_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_pivot_table import WorkbookPivotTable + from .refresh.refresh_request_builder import RefreshRequestBuilder + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + +class WorkbookPivotTableItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the pivotTables property of the microsoft.graph.workbookWorksheet entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookPivotTableItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/pivotTables/{workbookPivotTable%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property pivotTables for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookPivotTableItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookPivotTable]: + """ + Collection of PivotTables that are part of the worksheet. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookPivotTable] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_pivot_table import WorkbookPivotTable + + return await self.request_adapter.send_async(request_info, WorkbookPivotTable, error_mapping) + + async def patch(self,body: WorkbookPivotTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookPivotTable]: + """ + Update the navigation property pivotTables in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookPivotTable] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_pivot_table import WorkbookPivotTable + + return await self.request_adapter.send_async(request_info, WorkbookPivotTable, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property pivotTables for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookPivotTableItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection of PivotTables that are part of the worksheet. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookPivotTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property pivotTables in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookPivotTableItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookPivotTableItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookPivotTableItemRequestBuilder(self.request_adapter, raw_url) + + @property + def refresh(self) -> RefreshRequestBuilder: + """ + Provides operations to call the refresh method. + """ + from .refresh.refresh_request_builder import RefreshRequestBuilder + + return RefreshRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheet(self) -> WorksheetRequestBuilder: + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookPivotTable entity. + """ + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + + return WorksheetRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookPivotTableItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookPivotTableItemRequestBuilderGetQueryParameters(): + """ + Collection of PivotTables that are part of the worksheet. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookPivotTableItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookPivotTableItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookPivotTableItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/worksheet/worksheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..b7351301504 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/item/worksheet/worksheet_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_worksheet import WorkbookWorksheet + +class WorksheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookPivotTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/pivotTables/{workbookPivotTable%2Did}/worksheet{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + The worksheet containing the current PivotTable. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The worksheet containing the current PivotTable. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> WorksheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorksheetRequestBuilderGetQueryParameters(): + """ + The worksheet containing the current PivotTable. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/pivot_tables_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/pivot_tables_request_builder.py new file mode 100644 index 00000000000..c2b551fdc63 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/pivot_tables_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_pivot_table import WorkbookPivotTable + from ............models.workbook_pivot_table_collection_response import WorkbookPivotTableCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_pivot_table_item_request_builder import WorkbookPivotTableItemRequestBuilder + from .refresh_all.refresh_all_request_builder import RefreshAllRequestBuilder + +class PivotTablesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the pivotTables property of the microsoft.graph.workbookWorksheet entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PivotTablesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/pivotTables{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_pivot_table_id(self,workbook_pivot_table_id: str) -> WorkbookPivotTableItemRequestBuilder: + """ + Provides operations to manage the pivotTables property of the microsoft.graph.workbookWorksheet entity. + param workbook_pivot_table_id: The unique identifier of workbookPivotTable + Returns: WorkbookPivotTableItemRequestBuilder + """ + if not workbook_pivot_table_id: + raise TypeError("workbook_pivot_table_id cannot be null.") + from .item.workbook_pivot_table_item_request_builder import WorkbookPivotTableItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookPivotTable%2Did"] = workbook_pivot_table_id + return WorkbookPivotTableItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[PivotTablesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookPivotTableCollectionResponse]: + """ + Collection of PivotTables that are part of the worksheet. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookPivotTableCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_pivot_table_collection_response import WorkbookPivotTableCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookPivotTableCollectionResponse, error_mapping) + + async def post(self,body: WorkbookPivotTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookPivotTable]: + """ + Create new navigation property to pivotTables for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookPivotTable] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_pivot_table import WorkbookPivotTable + + return await self.request_adapter.send_async(request_info, WorkbookPivotTable, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PivotTablesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection of PivotTables that are part of the worksheet. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookPivotTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to pivotTables for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PivotTablesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PivotTablesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PivotTablesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def refresh_all(self) -> RefreshAllRequestBuilder: + """ + Provides operations to call the refreshAll method. + """ + from .refresh_all.refresh_all_request_builder import RefreshAllRequestBuilder + + return RefreshAllRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class PivotTablesRequestBuilderGetQueryParameters(): + """ + Collection of PivotTables that are part of the worksheet. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class PivotTablesRequestBuilderGetRequestConfiguration(RequestConfiguration[PivotTablesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class PivotTablesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/refresh_all/refresh_all_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/refresh_all/refresh_all_request_builder.py new file mode 100644 index 00000000000..24f2d4c3388 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/pivot_tables/refresh_all/refresh_all_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + +class RefreshAllRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the refreshAll method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RefreshAllRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/pivotTables/refreshAll", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Refreshes the PivotTable within a given worksheet. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/workbookpivottable-refreshall?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Refreshes the PivotTable within a given worksheet. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RefreshAllRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RefreshAllRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RefreshAllRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RefreshAllRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protect/protect_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protect/protect_post_request_body.py new file mode 100644 index 00000000000..eba64f5561c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protect/protect_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .............models.workbook_worksheet_protection_options import WorkbookWorksheetProtectionOptions + +@dataclass +class ProtectPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The options property + options: Optional[WorkbookWorksheetProtectionOptions] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ProtectPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ProtectPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ProtectPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .............models.workbook_worksheet_protection_options import WorkbookWorksheetProtectionOptions + + from .............models.workbook_worksheet_protection_options import WorkbookWorksheetProtectionOptions + + fields: Dict[str, Callable[[Any], None]] = { + "options": lambda n : setattr(self, 'options', n.get_object_value(WorkbookWorksheetProtectionOptions)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("options", self.options) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protect/protect_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protect/protect_request_builder.py new file mode 100644 index 00000000000..04e104d9fdd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protect/protect_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .protect_post_request_body import ProtectPostRequestBody + +class ProtectRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the protect method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ProtectRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/protection/protect", path_parameters) + + async def post(self,body: ProtectPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Protect a worksheet. It throws if the worksheet has been protected. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/worksheetprotection-protect?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ProtectPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Protect a worksheet. It throws if the worksheet has been protected. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ProtectRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ProtectRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ProtectRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ProtectRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protection_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protection_request_builder.py new file mode 100644 index 00000000000..5379bcb9cb0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/protection_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_worksheet_protection import WorkbookWorksheetProtection + from .protect.protect_request_builder import ProtectRequestBuilder + from .unprotect.unprotect_request_builder import UnprotectRequestBuilder + +class ProtectionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the protection property of the microsoft.graph.workbookWorksheet entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ProtectionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/protection{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property protection for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ProtectionRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheetProtection]: + """ + Returns sheet protection object for a worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheetProtection] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_worksheet_protection import WorkbookWorksheetProtection + + return await self.request_adapter.send_async(request_info, WorkbookWorksheetProtection, error_mapping) + + async def patch(self,body: WorkbookWorksheetProtection, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookWorksheetProtection]: + """ + Update the navigation property protection in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheetProtection] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_worksheet_protection import WorkbookWorksheetProtection + + return await self.request_adapter.send_async(request_info, WorkbookWorksheetProtection, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property protection for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ProtectionRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Returns sheet protection object for a worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookWorksheetProtection, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property protection in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ProtectionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ProtectionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ProtectionRequestBuilder(self.request_adapter, raw_url) + + @property + def protect(self) -> ProtectRequestBuilder: + """ + Provides operations to call the protect method. + """ + from .protect.protect_request_builder import ProtectRequestBuilder + + return ProtectRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def unprotect(self) -> UnprotectRequestBuilder: + """ + Provides operations to call the unprotect method. + """ + from .unprotect.unprotect_request_builder import UnprotectRequestBuilder + + return UnprotectRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ProtectionRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ProtectionRequestBuilderGetQueryParameters(): + """ + Returns sheet protection object for a worksheet. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ProtectionRequestBuilderGetRequestConfiguration(RequestConfiguration[ProtectionRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ProtectionRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/unprotect/unprotect_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/unprotect/unprotect_request_builder.py new file mode 100644 index 00000000000..276058c5973 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/protection/unprotect/unprotect_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + +class UnprotectRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the unprotect method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new UnprotectRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/protection/unprotect", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Unprotect a worksheet + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/worksheetprotection-unprotect?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Unprotect a worksheet + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> UnprotectRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: UnprotectRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return UnprotectRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class UnprotectRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/range/range_request_builder.py new file mode 100644 index 00000000000..80f491e6cd8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/range/range_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/range_with_address/range_with_address_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/range_with_address/range_with_address_request_builder.py new file mode 100644 index 00000000000..a23df0de1e9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/range_with_address/range_with_address_request_builder.py @@ -0,0 +1,83 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class RangeWithAddressRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], address: Optional[str] = None) -> None: + """ + Instantiates a new RangeWithAddressRequestBuilder and sets the default values. + param address: Usage: address='{address}' + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['address'] = str(address) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/range(address='{address}')", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeWithAddressRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeWithAddressRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeWithAddressRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeWithAddressRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/add/add_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/add/add_post_request_body.py new file mode 100644 index 00000000000..01be599b175 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/add/add_post_request_body.py @@ -0,0 +1,53 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class AddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The address property + address: Optional[str] = None + # The hasHeaders property + has_headers: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "address": lambda n : setattr(self, 'address', n.get_str_value()), + "hasHeaders": lambda n : setattr(self, 'has_headers', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("address", self.address) + writer.write_bool_value("hasHeaders", self.has_headers) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/add/add_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/add/add_request_builder.py new file mode 100644 index 00000000000..8520a32310a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/add/add_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_table import WorkbookTable + from .add_post_request_body import AddPostRequestBody + +class AddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the add method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/add", path_parameters) + + async def post(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTable]: + """ + Use this API to create a new Table. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTable] + Find more info here: https://learn.microsoft.com/graph/api/workbook-post-tables?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table import WorkbookTable + + return await self.request_adapter.send_async(request_info, WorkbookTable, error_mapping) + + def to_post_request_information(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Use this API to create a new Table. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/count/count_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/count/count_get_response.py new file mode 100644 index 00000000000..adc36fe76ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/count/count_request_builder.py new file mode 100644 index 00000000000..e4fa08cc7e3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/count/count_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .count_get_response import CountGetResponse + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the count method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/count()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CountGetResponse]: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CountGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .count_get_response import CountGetResponse + + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/clear_filters/clear_filters_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/clear_filters/clear_filters_request_builder.py new file mode 100644 index 00000000000..6ec1bceda86 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/clear_filters/clear_filters_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + +class ClearFiltersRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clearFilters method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearFiltersRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/clearFilters", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clears all the filters currently applied on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/table-clearfilters?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clears all the filters currently applied on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearFiltersRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearFiltersRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearFiltersRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearFiltersRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/add/add_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/add/add_post_request_body.py new file mode 100644 index 00000000000..af08963c3ac --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/add/add_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...............models.json import Json + +@dataclass +class AddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The index property + index: Optional[int] = None + # The name property + name: Optional[str] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...............models.json import Json + + from ...............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "index": lambda n : setattr(self, 'index', n.get_int_value()), + "name": lambda n : setattr(self, 'name', n.get_str_value()), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("index", self.index) + writer.write_str_value("name", self.name) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/add/add_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/add/add_request_builder.py new file mode 100644 index 00000000000..d346ee104f2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/add/add_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_table_column import WorkbookTableColumn + from .add_post_request_body import AddPostRequestBody + +class AddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the add method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/add", path_parameters) + + async def post(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Adds a new column to the table. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumncollection-add?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + def to_post_request_information(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Adds a new column to the table. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/columns_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/columns_request_builder.py new file mode 100644 index 00000000000..fc0fecb93da --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/columns_request_builder.py @@ -0,0 +1,230 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_table_column import WorkbookTableColumn + from ..............models.workbook_table_column_collection_response import WorkbookTableColumnCollectionResponse + from .add.add_request_builder import AddRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_table_column_item_request_builder import WorkbookTableColumnItemRequestBuilder + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_table_column_id(self,workbook_table_column_id: str) -> WorkbookTableColumnItemRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + param workbook_table_column_id: The unique identifier of workbookTableColumn + Returns: WorkbookTableColumnItemRequestBuilder + """ + if not workbook_table_column_id: + raise TypeError("workbook_table_column_id cannot be null.") + from .item.workbook_table_column_item_request_builder import WorkbookTableColumnItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookTableColumn%2Did"] = workbook_table_column_id + return WorkbookTableColumnItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableColumnCollectionResponse]: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumnCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_column_collection_response import WorkbookTableColumnCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookTableColumnCollectionResponse, error_mapping) + + def item_at_with_index(self,index: int) -> ItemAtWithIndexRequestBuilder: + """ + Provides operations to call the itemAt method. + param index: Usage: index={index} + Returns: ItemAtWithIndexRequestBuilder + """ + if not index: + raise TypeError("index cannot be null.") + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + + return ItemAtWithIndexRequestBuilder(self.request_adapter, self.path_parameters, index) + + async def post(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnsRequestBuilder(self.request_adapter, raw_url) + + @property + def add(self) -> AddRequestBuilder: + """ + Provides operations to call the add method. + """ + from .add.add_request_builder import AddRequestBuilder + + return AddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to call the count method. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ColumnsRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the columns in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/count/count_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/count/count_get_response.py new file mode 100644 index 00000000000..adc36fe76ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/count/count_request_builder.py new file mode 100644 index 00000000000..a7707eb729a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/count/count_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .count_get_response import CountGetResponse + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the count method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/count()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CountGetResponse]: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CountGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .count_get_response import CountGetResponse + + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/data_body_range/data_body_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/data_body_range/data_body_range_request_builder.py new file mode 100644 index 00000000000..84f3f98e6e8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/data_body_range/data_body_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_range import WorkbookRange + +class DataBodyRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dataBodyRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataBodyRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the data body of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-databodyrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the data body of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DataBodyRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataBodyRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataBodyRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_post_request_body.py new file mode 100644 index 00000000000..6d90220e0bf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .................models.workbook_filter_criteria import WorkbookFilterCriteria + +@dataclass +class ApplyPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[WorkbookFilterCriteria] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .................models.workbook_filter_criteria import WorkbookFilterCriteria + + from .................models.workbook_filter_criteria import WorkbookFilterCriteria + + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_object_value(WorkbookFilterCriteria)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("criteria", self.criteria) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_request_builder.py new file mode 100644 index 00000000000..47a32c99ec5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply/apply_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_post_request_body import ApplyPostRequestBody + +class ApplyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the apply method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/apply", path_parameters) + + async def post(self,body: ApplyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Apply the given filter criteria on the given column. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/filter-apply?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Apply the given filter criteria on the given column. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_post_request_body.py new file mode 100644 index 00000000000..91ce961da97 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyBottomItemsFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The count property + count: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyBottomItemsFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyBottomItemsFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyBottomItemsFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "count": lambda n : setattr(self, 'count', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("count", self.count) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py new file mode 100644 index 00000000000..90e098ac6b4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_items_filter/apply_bottom_items_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_bottom_items_filter_post_request_body import ApplyBottomItemsFilterPostRequestBody + +class ApplyBottomItemsFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyBottomItemsFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyBottomItemsFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyBottomItemsFilter", path_parameters) + + async def post(self,body: ApplyBottomItemsFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyBottomItemsFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyBottomItemsFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyBottomItemsFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyBottomItemsFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyBottomItemsFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyBottomItemsFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyBottomItemsFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_post_request_body.py new file mode 100644 index 00000000000..d6494d7d508 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyBottomPercentFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The percent property + percent: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyBottomPercentFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyBottomPercentFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyBottomPercentFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "percent": lambda n : setattr(self, 'percent', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("percent", self.percent) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py new file mode 100644 index 00000000000..e05114f0cdb --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_bottom_percent_filter/apply_bottom_percent_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_bottom_percent_filter_post_request_body import ApplyBottomPercentFilterPostRequestBody + +class ApplyBottomPercentFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyBottomPercentFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyBottomPercentFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyBottomPercentFilter", path_parameters) + + async def post(self,body: ApplyBottomPercentFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyBottomPercentFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyBottomPercentFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyBottomPercentFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyBottomPercentFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyBottomPercentFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyBottomPercentFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyBottomPercentFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_post_request_body.py new file mode 100644 index 00000000000..8c07590af34 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyCellColorFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The color property + color: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyCellColorFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyCellColorFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyCellColorFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "color": lambda n : setattr(self, 'color', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("color", self.color) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py new file mode 100644 index 00000000000..6c9eb5e2a63 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_cell_color_filter/apply_cell_color_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_cell_color_filter_post_request_body import ApplyCellColorFilterPostRequestBody + +class ApplyCellColorFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyCellColorFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyCellColorFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyCellColorFilter", path_parameters) + + async def post(self,body: ApplyCellColorFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyCellColorFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyCellColorFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyCellColorFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyCellColorFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyCellColorFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyCellColorFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyCellColorFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_post_request_body.py new file mode 100644 index 00000000000..cc968ec264b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_post_request_body.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyCustomFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria1 property + criteria1: Optional[str] = None + # The criteria2 property + criteria2: Optional[str] = None + # The oper property + oper: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyCustomFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyCustomFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyCustomFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "criteria1": lambda n : setattr(self, 'criteria1', n.get_str_value()), + "criteria2": lambda n : setattr(self, 'criteria2', n.get_str_value()), + "oper": lambda n : setattr(self, 'oper', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("criteria1", self.criteria1) + writer.write_str_value("criteria2", self.criteria2) + writer.write_str_value("oper", self.oper) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py new file mode 100644 index 00000000000..4f0cf0dd097 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_custom_filter/apply_custom_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_custom_filter_post_request_body import ApplyCustomFilterPostRequestBody + +class ApplyCustomFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyCustomFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyCustomFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyCustomFilter", path_parameters) + + async def post(self,body: ApplyCustomFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyCustomFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyCustomFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyCustomFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyCustomFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyCustomFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyCustomFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyCustomFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_post_request_body.py new file mode 100644 index 00000000000..f38941f61dc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyDynamicFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The criteria property + criteria: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyDynamicFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyDynamicFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyDynamicFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "criteria": lambda n : setattr(self, 'criteria', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("criteria", self.criteria) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py new file mode 100644 index 00000000000..77a8172aecc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_dynamic_filter/apply_dynamic_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_dynamic_filter_post_request_body import ApplyDynamicFilterPostRequestBody + +class ApplyDynamicFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyDynamicFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyDynamicFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyDynamicFilter", path_parameters) + + async def post(self,body: ApplyDynamicFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyDynamicFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyDynamicFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyDynamicFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyDynamicFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyDynamicFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyDynamicFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyDynamicFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_post_request_body.py new file mode 100644 index 00000000000..b2f933d6f67 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyFontColorFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The color property + color: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyFontColorFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyFontColorFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyFontColorFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "color": lambda n : setattr(self, 'color', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("color", self.color) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py new file mode 100644 index 00000000000..fecb933439c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_font_color_filter/apply_font_color_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_font_color_filter_post_request_body import ApplyFontColorFilterPostRequestBody + +class ApplyFontColorFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyFontColorFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyFontColorFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyFontColorFilter", path_parameters) + + async def post(self,body: ApplyFontColorFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyFontColorFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyFontColorFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyFontColorFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyFontColorFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyFontColorFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyFontColorFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyFontColorFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_post_request_body.py new file mode 100644 index 00000000000..28c7560108f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .................models.workbook_icon import WorkbookIcon + +@dataclass +class ApplyIconFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The icon property + icon: Optional[WorkbookIcon] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyIconFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyIconFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyIconFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .................models.workbook_icon import WorkbookIcon + + from .................models.workbook_icon import WorkbookIcon + + fields: Dict[str, Callable[[Any], None]] = { + "icon": lambda n : setattr(self, 'icon', n.get_object_value(WorkbookIcon)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("icon", self.icon) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py new file mode 100644 index 00000000000..8c0f0634a6f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_icon_filter/apply_icon_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_icon_filter_post_request_body import ApplyIconFilterPostRequestBody + +class ApplyIconFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyIconFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyIconFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyIconFilter", path_parameters) + + async def post(self,body: ApplyIconFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyIconFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyIconFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyIconFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyIconFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyIconFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyIconFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyIconFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_post_request_body.py new file mode 100644 index 00000000000..c60a50f3408 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyTopItemsFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The count property + count: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyTopItemsFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyTopItemsFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyTopItemsFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "count": lambda n : setattr(self, 'count', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("count", self.count) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py new file mode 100644 index 00000000000..f0bc4723475 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_items_filter/apply_top_items_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_top_items_filter_post_request_body import ApplyTopItemsFilterPostRequestBody + +class ApplyTopItemsFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyTopItemsFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyTopItemsFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyTopItemsFilter", path_parameters) + + async def post(self,body: ApplyTopItemsFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyTopItemsFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyTopItemsFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyTopItemsFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyTopItemsFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyTopItemsFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyTopItemsFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyTopItemsFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_post_request_body.py new file mode 100644 index 00000000000..e30d99da2a9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class ApplyTopPercentFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The percent property + percent: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyTopPercentFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyTopPercentFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyTopPercentFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "percent": lambda n : setattr(self, 'percent', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("percent", self.percent) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py new file mode 100644 index 00000000000..ab9204ac1b4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_top_percent_filter/apply_top_percent_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_top_percent_filter_post_request_body import ApplyTopPercentFilterPostRequestBody + +class ApplyTopPercentFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyTopPercentFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyTopPercentFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyTopPercentFilter", path_parameters) + + async def post(self,body: ApplyTopPercentFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyTopPercentFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyTopPercentFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyTopPercentFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyTopPercentFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyTopPercentFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyTopPercentFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyTopPercentFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_post_request_body.py new file mode 100644 index 00000000000..a7458d55753 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_post_request_body.py @@ -0,0 +1,56 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .................models.json import Json + +@dataclass +class ApplyValuesFilterPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyValuesFilterPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyValuesFilterPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyValuesFilterPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .................models.json import Json + + from .................models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py new file mode 100644 index 00000000000..355d1a1297b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/apply_values_filter/apply_values_filter_request_builder.py @@ -0,0 +1,85 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + from .apply_values_filter_post_request_body import ApplyValuesFilterPostRequestBody + +class ApplyValuesFilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the applyValuesFilter method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyValuesFilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/applyValuesFilter", path_parameters) + + async def post(self,body: ApplyValuesFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Invoke action applyValuesFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyValuesFilterPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action applyValuesFilter + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyValuesFilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyValuesFilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyValuesFilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyValuesFilterRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/clear/clear_request_builder.py new file mode 100644 index 00000000000..cfb3377ebee --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .................models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clear the filter on the given column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/filter-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from .................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clear the filter on the given column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/filter_request_builder.py new file mode 100644 index 00000000000..c487f824c74 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/filter/filter_request_builder.py @@ -0,0 +1,307 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_filter import WorkbookFilter + from .apply.apply_request_builder import ApplyRequestBuilder + from .apply_bottom_items_filter.apply_bottom_items_filter_request_builder import ApplyBottomItemsFilterRequestBuilder + from .apply_bottom_percent_filter.apply_bottom_percent_filter_request_builder import ApplyBottomPercentFilterRequestBuilder + from .apply_cell_color_filter.apply_cell_color_filter_request_builder import ApplyCellColorFilterRequestBuilder + from .apply_custom_filter.apply_custom_filter_request_builder import ApplyCustomFilterRequestBuilder + from .apply_dynamic_filter.apply_dynamic_filter_request_builder import ApplyDynamicFilterRequestBuilder + from .apply_font_color_filter.apply_font_color_filter_request_builder import ApplyFontColorFilterRequestBuilder + from .apply_icon_filter.apply_icon_filter_request_builder import ApplyIconFilterRequestBuilder + from .apply_top_items_filter.apply_top_items_filter_request_builder import ApplyTopItemsFilterRequestBuilder + from .apply_top_percent_filter.apply_top_percent_filter_request_builder import ApplyTopPercentFilterRequestBuilder + from .apply_values_filter.apply_values_filter_request_builder import ApplyValuesFilterRequestBuilder + from .clear.clear_request_builder import ClearRequestBuilder + +class FilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the filter property of the microsoft.graph.workbookTableColumn entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/filter{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property filter for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FilterRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookFilter]: + """ + Retrieve the filter applied to the column. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFilter] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_filter import WorkbookFilter + + return await self.request_adapter.send_async(request_info, WorkbookFilter, error_mapping) + + async def patch(self,body: WorkbookFilter, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFilter]: + """ + Update the navigation property filter in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFilter] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_filter import WorkbookFilter + + return await self.request_adapter.send_async(request_info, WorkbookFilter, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property filter for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FilterRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Retrieve the filter applied to the column. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookFilter, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property filter in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilterRequestBuilder(self.request_adapter, raw_url) + + @property + def apply(self) -> ApplyRequestBuilder: + """ + Provides operations to call the apply method. + """ + from .apply.apply_request_builder import ApplyRequestBuilder + + return ApplyRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_bottom_items_filter(self) -> ApplyBottomItemsFilterRequestBuilder: + """ + Provides operations to call the applyBottomItemsFilter method. + """ + from .apply_bottom_items_filter.apply_bottom_items_filter_request_builder import ApplyBottomItemsFilterRequestBuilder + + return ApplyBottomItemsFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_bottom_percent_filter(self) -> ApplyBottomPercentFilterRequestBuilder: + """ + Provides operations to call the applyBottomPercentFilter method. + """ + from .apply_bottom_percent_filter.apply_bottom_percent_filter_request_builder import ApplyBottomPercentFilterRequestBuilder + + return ApplyBottomPercentFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_cell_color_filter(self) -> ApplyCellColorFilterRequestBuilder: + """ + Provides operations to call the applyCellColorFilter method. + """ + from .apply_cell_color_filter.apply_cell_color_filter_request_builder import ApplyCellColorFilterRequestBuilder + + return ApplyCellColorFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_custom_filter(self) -> ApplyCustomFilterRequestBuilder: + """ + Provides operations to call the applyCustomFilter method. + """ + from .apply_custom_filter.apply_custom_filter_request_builder import ApplyCustomFilterRequestBuilder + + return ApplyCustomFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_dynamic_filter(self) -> ApplyDynamicFilterRequestBuilder: + """ + Provides operations to call the applyDynamicFilter method. + """ + from .apply_dynamic_filter.apply_dynamic_filter_request_builder import ApplyDynamicFilterRequestBuilder + + return ApplyDynamicFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_font_color_filter(self) -> ApplyFontColorFilterRequestBuilder: + """ + Provides operations to call the applyFontColorFilter method. + """ + from .apply_font_color_filter.apply_font_color_filter_request_builder import ApplyFontColorFilterRequestBuilder + + return ApplyFontColorFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_icon_filter(self) -> ApplyIconFilterRequestBuilder: + """ + Provides operations to call the applyIconFilter method. + """ + from .apply_icon_filter.apply_icon_filter_request_builder import ApplyIconFilterRequestBuilder + + return ApplyIconFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_top_items_filter(self) -> ApplyTopItemsFilterRequestBuilder: + """ + Provides operations to call the applyTopItemsFilter method. + """ + from .apply_top_items_filter.apply_top_items_filter_request_builder import ApplyTopItemsFilterRequestBuilder + + return ApplyTopItemsFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_top_percent_filter(self) -> ApplyTopPercentFilterRequestBuilder: + """ + Provides operations to call the applyTopPercentFilter method. + """ + from .apply_top_percent_filter.apply_top_percent_filter_request_builder import ApplyTopPercentFilterRequestBuilder + + return ApplyTopPercentFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def apply_values_filter(self) -> ApplyValuesFilterRequestBuilder: + """ + Provides operations to call the applyValuesFilter method. + """ + from .apply_values_filter.apply_values_filter_request_builder import ApplyValuesFilterRequestBuilder + + return ApplyValuesFilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FilterRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FilterRequestBuilderGetQueryParameters(): + """ + Retrieve the filter applied to the column. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FilterRequestBuilderGetRequestConfiguration(RequestConfiguration[FilterRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FilterRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/header_row_range/header_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/header_row_range/header_row_range_request_builder.py new file mode 100644 index 00000000000..2f1a0267761 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/header_row_range/header_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_range import WorkbookRange + +class HeaderRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the headerRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HeaderRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the header row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-headerrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the header row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> HeaderRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HeaderRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HeaderRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/range/range_request_builder.py new file mode 100644 index 00000000000..d2b2b2833d0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/range/range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the entire column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-range?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the entire column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/total_row_range/total_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/total_row_range/total_row_range_request_builder.py new file mode 100644 index 00000000000..ff01faf4ba0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/total_row_range/total_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_range import WorkbookRange + +class TotalRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the totalRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TotalRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the totals row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-totalrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the totals row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TotalRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TotalRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TotalRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/workbook_table_column_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/workbook_table_column_item_request_builder.py new file mode 100644 index 00000000000..8095044d6a1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item/workbook_table_column_item_request_builder.py @@ -0,0 +1,237 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_table_column import WorkbookTableColumn + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + from .filter.filter_request_builder import FilterRequestBuilder + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + from .range.range_request_builder import RangeRequestBuilder + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + +class WorkbookTableColumnItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookTableColumnItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/{workbookTableColumn%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property columns for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookTableColumnItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + async def patch(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Update the navigation property columns in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property columns for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookTableColumnItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property columns in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookTableColumnItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookTableColumnItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookTableColumnItemRequestBuilder(self.request_adapter, raw_url) + + @property + def data_body_range(self) -> DataBodyRangeRequestBuilder: + """ + Provides operations to call the dataBodyRange method. + """ + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + + return DataBodyRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def filter(self) -> FilterRequestBuilder: + """ + Provides operations to manage the filter property of the microsoft.graph.workbookTableColumn entity. + """ + from .filter.filter_request_builder import FilterRequestBuilder + + return FilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def header_row_range(self) -> HeaderRowRangeRequestBuilder: + """ + Provides operations to call the headerRowRange method. + """ + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + + return HeaderRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def total_row_range(self) -> TotalRowRangeRequestBuilder: + """ + Provides operations to call the totalRowRange method. + """ + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + + return TotalRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookTableColumnItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableColumnItemRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the columns in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookTableColumnItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookTableColumnItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableColumnItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py new file mode 100644 index 00000000000..99281499650 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/data_body_range/data_body_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_range import WorkbookRange + +class DataBodyRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dataBodyRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataBodyRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the data body of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-databodyrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the data body of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DataBodyRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataBodyRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataBodyRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/filter/filter_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/filter/filter_request_builder.py new file mode 100644 index 00000000000..9e9e69c6524 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/filter/filter_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_filter import WorkbookFilter + +class FilterRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the filter property of the microsoft.graph.workbookTableColumn entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FilterRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})/filter{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property filter for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FilterRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookFilter]: + """ + Retrieve the filter applied to the column. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFilter] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_filter import WorkbookFilter + + return await self.request_adapter.send_async(request_info, WorkbookFilter, error_mapping) + + async def patch(self,body: WorkbookFilter, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookFilter]: + """ + Update the navigation property filter in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookFilter] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_filter import WorkbookFilter + + return await self.request_adapter.send_async(request_info, WorkbookFilter, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property filter for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FilterRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Retrieve the filter applied to the column. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookFilter, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property filter in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FilterRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FilterRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FilterRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FilterRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FilterRequestBuilderGetQueryParameters(): + """ + Retrieve the filter applied to the column. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FilterRequestBuilderGetRequestConfiguration(RequestConfiguration[FilterRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FilterRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py new file mode 100644 index 00000000000..63eadba170f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/header_row_range/header_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_range import WorkbookRange + +class HeaderRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the headerRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HeaderRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the header row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-headerrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the header row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> HeaderRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HeaderRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HeaderRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py new file mode 100644 index 00000000000..0b46b8b5889 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/item_at_with_index_request_builder.py @@ -0,0 +1,134 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_table_column import WorkbookTableColumn + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + from .filter.filter_request_builder import FilterRequestBuilder + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + from .range.range_request_builder import RangeRequestBuilder + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + +class ItemAtWithIndexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the itemAt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], index: Optional[int] = None) -> None: + """ + Instantiates a new ItemAtWithIndexRequestBuilder and sets the default values. + param index: Usage: index={index} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Gets a column based on its position in the collection. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumncollection-itemat?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets a column based on its position in the collection. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ItemAtWithIndexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemAtWithIndexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemAtWithIndexRequestBuilder(self.request_adapter, raw_url) + + @property + def data_body_range(self) -> DataBodyRangeRequestBuilder: + """ + Provides operations to call the dataBodyRange method. + """ + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + + return DataBodyRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def filter(self) -> FilterRequestBuilder: + """ + Provides operations to manage the filter property of the microsoft.graph.workbookTableColumn entity. + """ + from .filter.filter_request_builder import FilterRequestBuilder + + return FilterRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def header_row_range(self) -> HeaderRowRangeRequestBuilder: + """ + Provides operations to call the headerRowRange method. + """ + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + + return HeaderRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def total_row_range(self) -> TotalRowRangeRequestBuilder: + """ + Provides operations to call the totalRowRange method. + """ + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + + return TotalRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemAtWithIndexRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..96548f6ec0d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/range/range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the entire column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-range?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the entire column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py new file mode 100644 index 00000000000..7c478c24df7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/columns/item_at_with_index/total_row_range/total_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_range import WorkbookRange + +class TotalRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the totalRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TotalRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/columns/itemAt(index={index})/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the totals row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/tablecolumn-totalrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the totals row of the column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TotalRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TotalRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TotalRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/convert_to_range/convert_to_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/convert_to_range/convert_to_range_request_builder.py new file mode 100644 index 00000000000..95baac4735e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/convert_to_range/convert_to_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class ConvertToRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the convertToRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ConvertToRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/convertToRange", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Converts the table into a normal range of cells. All data is preserved. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-converttorange?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Converts the table into a normal range of cells. All data is preserved. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ConvertToRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ConvertToRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ConvertToRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ConvertToRangeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/data_body_range/data_body_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/data_body_range/data_body_range_request_builder.py new file mode 100644 index 00000000000..0ca7ebe3f84 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/data_body_range/data_body_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class DataBodyRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dataBodyRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataBodyRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the data body of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-databodyrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the data body of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DataBodyRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataBodyRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataBodyRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/header_row_range/header_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/header_row_range/header_row_range_request_builder.py new file mode 100644 index 00000000000..0b7e7972f72 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/header_row_range/header_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class HeaderRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the headerRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HeaderRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with header row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-headerrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with header row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> HeaderRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HeaderRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HeaderRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/range/range_request_builder.py new file mode 100644 index 00000000000..305002f83c5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/range/range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Get the range object associated with the entire table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-range?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Get the range object associated with the entire table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/reapply_filters/reapply_filters_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/reapply_filters/reapply_filters_request_builder.py new file mode 100644 index 00000000000..ee99913fc25 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/reapply_filters/reapply_filters_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + +class ReapplyFiltersRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the reapplyFilters method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReapplyFiltersRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/reapplyFilters", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Reapplies all the filters currently on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/table-reapplyfilters?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Reapplies all the filters currently on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ReapplyFiltersRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReapplyFiltersRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReapplyFiltersRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReapplyFiltersRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/add/add_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/add/add_post_request_body.py new file mode 100644 index 00000000000..c3074ccdb2b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/add/add_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...............models.json import Json + +@dataclass +class AddPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The index property + index: Optional[int] = None + # The values property + values: Optional[Json] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...............models.json import Json + + from ...............models.json import Json + + fields: Dict[str, Callable[[Any], None]] = { + "index": lambda n : setattr(self, 'index', n.get_int_value()), + "values": lambda n : setattr(self, 'values', n.get_object_value(Json)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("index", self.index) + writer.write_object_value("values", self.values) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/add/add_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/add/add_request_builder.py new file mode 100644 index 00000000000..6e710d24307 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/add/add_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_table_row import WorkbookTableRow + from .add_post_request_body import AddPostRequestBody + +class AddRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the add method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/rows/add", path_parameters) + + async def post(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + Find more info here: https://learn.microsoft.com/graph/api/tablerowcollection-add?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_post_request_information(self,body: AddPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Adds rows to the end of the table. Note that the API can accept multiple rows data using this API. Adding one row at a time could lead to performance degradation. The recommended approach would be to batch the rows together in a single call rather than doing single row insertion. For best results, collect the rows to be inserted on the application side and perform single rows add operation. Experiment with the number of rows to determine the ideal number of rows to use in single API call. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/count/count_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/count/count_get_response.py new file mode 100644 index 00000000000..adc36fe76ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/count/count_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class CountGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[int] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CountGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CountGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CountGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_int_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_int_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/count/count_request_builder.py new file mode 100644 index 00000000000..0d5872506a6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/count/count_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .count_get_response import CountGetResponse + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the count method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/rows/count()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[CountGetResponse]: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[CountGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .count_get_response import CountGetResponse + + return await self.request_adapter.send_async(request_info, CountGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function count + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item/range/range_request_builder.py new file mode 100644 index 00000000000..9954c96544a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item/range/range_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/rows/{workbookTableRow%2Did}/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item/workbook_table_row_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item/workbook_table_row_item_request_builder.py new file mode 100644 index 00000000000..9eedf8ec555 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item/workbook_table_row_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_table_row import WorkbookTableRow + from .range.range_request_builder import RangeRequestBuilder + +class WorkbookTableRowItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookTableRowItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/rows/{workbookTableRow%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property rows for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookTableRowItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + async def patch(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Update the navigation property rows in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property rows for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookTableRowItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property rows in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookTableRowItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookTableRowItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookTableRowItemRequestBuilder(self.request_adapter, raw_url) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookTableRowItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableRowItemRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the rows in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookTableRowItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookTableRowItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableRowItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py new file mode 100644 index 00000000000..9fd0dae4fab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/item_at_with_index_request_builder.py @@ -0,0 +1,94 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from ...............models.workbook_table_row import WorkbookTableRow + from .range.range_request_builder import RangeRequestBuilder + +class ItemAtWithIndexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the itemAt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], index: Optional[int] = None) -> None: + """ + Instantiates a new ItemAtWithIndexRequestBuilder and sets the default values. + param index: Usage: index={index} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/rows/itemAt(index={index})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Gets a row based on its position in the collection. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + Find more info here: https://learn.microsoft.com/graph/api/tablerowcollection-itemat?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets a row based on its position in the collection. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ItemAtWithIndexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemAtWithIndexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemAtWithIndexRequestBuilder(self.request_adapter, raw_url) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemAtWithIndexRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..652b47f687d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/item_at_with_index/range/range_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ................models.o_data_errors.o_data_error import ODataError + from ................models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/rows/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ................models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ................models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function range + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/rows_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/rows_request_builder.py new file mode 100644 index 00000000000..e0fa389dca4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/rows/rows_request_builder.py @@ -0,0 +1,230 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_table_row import WorkbookTableRow + from ..............models.workbook_table_row_collection_response import WorkbookTableRowCollectionResponse + from .add.add_request_builder import AddRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_table_row_item_request_builder import WorkbookTableRowItemRequestBuilder + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + +class RowsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RowsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/rows{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_table_row_id(self,workbook_table_row_id: str) -> WorkbookTableRowItemRequestBuilder: + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + param workbook_table_row_id: The unique identifier of workbookTableRow + Returns: WorkbookTableRowItemRequestBuilder + """ + if not workbook_table_row_id: + raise TypeError("workbook_table_row_id cannot be null.") + from .item.workbook_table_row_item_request_builder import WorkbookTableRowItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookTableRow%2Did"] = workbook_table_row_id + return WorkbookTableRowItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[RowsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableRowCollectionResponse]: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRowCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_row_collection_response import WorkbookTableRowCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookTableRowCollectionResponse, error_mapping) + + def item_at_with_index(self,index: int) -> ItemAtWithIndexRequestBuilder: + """ + Provides operations to call the itemAt method. + param index: Usage: index={index} + Returns: ItemAtWithIndexRequestBuilder + """ + if not index: + raise TypeError("index cannot be null.") + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + + return ItemAtWithIndexRequestBuilder(self.request_adapter, self.path_parameters, index) + + async def post(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Create new navigation property to rows for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RowsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to rows for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RowsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RowsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RowsRequestBuilder(self.request_adapter, raw_url) + + @property + def add(self) -> AddRequestBuilder: + """ + Provides operations to call the add method. + """ + from .add.add_request_builder import AddRequestBuilder + + return AddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to call the count method. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class RowsRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the rows in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class RowsRequestBuilderGetRequestConfiguration(RequestConfiguration[RowsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RowsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_post_request_body.py new file mode 100644 index 00000000000..acc924ea208 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_post_request_body.py @@ -0,0 +1,64 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ...............models.workbook_sort_field import WorkbookSortField + +@dataclass +class ApplyPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The fields property + fields: Optional[List[WorkbookSortField]] = None + # The matchCase property + match_case: Optional[bool] = None + # The method property + method: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> ApplyPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: ApplyPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return ApplyPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ...............models.workbook_sort_field import WorkbookSortField + + from ...............models.workbook_sort_field import WorkbookSortField + + fields: Dict[str, Callable[[Any], None]] = { + "fields": lambda n : setattr(self, 'fields', n.get_collection_of_object_values(WorkbookSortField)), + "matchCase": lambda n : setattr(self, 'match_case', n.get_bool_value()), + "method": lambda n : setattr(self, 'method', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_collection_of_object_values("fields", self.fields) + writer.write_bool_value("matchCase", self.match_case) + writer.write_str_value("method", self.method) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_request_builder.py new file mode 100644 index 00000000000..8c115dd2da6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/apply/apply_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + from .apply_post_request_body import ApplyPostRequestBody + +class ApplyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the apply method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ApplyRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/sort/apply", path_parameters) + + async def post(self,body: ApplyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Perform a sort operation. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/tablesort-apply?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: ApplyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Perform a sort operation. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ApplyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ApplyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ApplyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ApplyRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/clear/clear_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/clear/clear_request_builder.py new file mode 100644 index 00000000000..bd0a62a2cfe --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/clear/clear_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + +class ClearRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clear method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/sort/clear", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/tablesort-clear?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clears the sorting that is currently on the table. While this doesn't modify the table's ordering, it clears the state of the header buttons. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/reapply/reapply_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/reapply/reapply_request_builder.py new file mode 100644 index 00000000000..a5dbf8e777f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/reapply/reapply_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...............models.o_data_errors.o_data_error import ODataError + +class ReapplyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the reapply method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReapplyRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/sort/reapply", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Reapplies the current sorting parameters to the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/tablesort-reapply?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ...............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Reapplies the current sorting parameters to the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ReapplyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReapplyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReapplyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReapplyRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/sort_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/sort_request_builder.py new file mode 100644 index 00000000000..e4d22138d16 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/sort/sort_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_table_sort import WorkbookTableSort + from .apply.apply_request_builder import ApplyRequestBuilder + from .clear.clear_request_builder import ClearRequestBuilder + from .reapply.reapply_request_builder import ReapplyRequestBuilder + +class SortRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sort property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SortRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/sort{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property sort for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[SortRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableSort]: + """ + Represents the sorting for the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableSort] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_sort import WorkbookTableSort + + return await self.request_adapter.send_async(request_info, WorkbookTableSort, error_mapping) + + async def patch(self,body: WorkbookTableSort, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableSort]: + """ + Update the navigation property sort in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableSort] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_sort import WorkbookTableSort + + return await self.request_adapter.send_async(request_info, WorkbookTableSort, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property sort for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SortRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the sorting for the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookTableSort, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property sort in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SortRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SortRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SortRequestBuilder(self.request_adapter, raw_url) + + @property + def apply(self) -> ApplyRequestBuilder: + """ + Provides operations to call the apply method. + """ + from .apply.apply_request_builder import ApplyRequestBuilder + + return ApplyRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def clear(self) -> ClearRequestBuilder: + """ + Provides operations to call the clear method. + """ + from .clear.clear_request_builder import ClearRequestBuilder + + return ClearRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def reapply(self) -> ReapplyRequestBuilder: + """ + Provides operations to call the reapply method. + """ + from .reapply.reapply_request_builder import ReapplyRequestBuilder + + return ReapplyRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SortRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SortRequestBuilderGetQueryParameters(): + """ + Represents the sorting for the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class SortRequestBuilderGetRequestConfiguration(RequestConfiguration[SortRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SortRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/total_row_range/total_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/total_row_range/total_row_range_request_builder.py new file mode 100644 index 00000000000..8c2e74274d9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/total_row_range/total_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class TotalRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the totalRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TotalRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with totals row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-totalrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with totals row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TotalRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TotalRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TotalRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/workbook_table_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/workbook_table_item_request_builder.py new file mode 100644 index 00000000000..a6fe66a3ca8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/workbook_table_item_request_builder.py @@ -0,0 +1,297 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_table import WorkbookTable + from .clear_filters.clear_filters_request_builder import ClearFiltersRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder + from .convert_to_range.convert_to_range_request_builder import ConvertToRangeRequestBuilder + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + from .range.range_request_builder import RangeRequestBuilder + from .reapply_filters.reapply_filters_request_builder import ReapplyFiltersRequestBuilder + from .rows.rows_request_builder import RowsRequestBuilder + from .sort.sort_request_builder import SortRequestBuilder + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + +class WorkbookTableItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the tables property of the microsoft.graph.workbookWorksheet entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookTableItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property tables for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookTableItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTable]: + """ + Collection of tables that are part of the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTable] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table import WorkbookTable + + return await self.request_adapter.send_async(request_info, WorkbookTable, error_mapping) + + async def patch(self,body: WorkbookTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTable]: + """ + Update the navigation property tables in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTable] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table import WorkbookTable + + return await self.request_adapter.send_async(request_info, WorkbookTable, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property tables for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookTableItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection of tables that are part of the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property tables in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorkbookTableItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookTableItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookTableItemRequestBuilder(self.request_adapter, raw_url) + + @property + def clear_filters(self) -> ClearFiltersRequestBuilder: + """ + Provides operations to call the clearFilters method. + """ + from .clear_filters.clear_filters_request_builder import ClearFiltersRequestBuilder + + return ClearFiltersRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + """ + from .columns.columns_request_builder import ColumnsRequestBuilder + + return ColumnsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def convert_to_range(self) -> ConvertToRangeRequestBuilder: + """ + Provides operations to call the convertToRange method. + """ + from .convert_to_range.convert_to_range_request_builder import ConvertToRangeRequestBuilder + + return ConvertToRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def data_body_range(self) -> DataBodyRangeRequestBuilder: + """ + Provides operations to call the dataBodyRange method. + """ + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + + return DataBodyRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def header_row_range(self) -> HeaderRowRangeRequestBuilder: + """ + Provides operations to call the headerRowRange method. + """ + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + + return HeaderRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def reapply_filters(self) -> ReapplyFiltersRequestBuilder: + """ + Provides operations to call the reapplyFilters method. + """ + from .reapply_filters.reapply_filters_request_builder import ReapplyFiltersRequestBuilder + + return ReapplyFiltersRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rows(self) -> RowsRequestBuilder: + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + """ + from .rows.rows_request_builder import RowsRequestBuilder + + return RowsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sort(self) -> SortRequestBuilder: + """ + Provides operations to manage the sort property of the microsoft.graph.workbookTable entity. + """ + from .sort.sort_request_builder import SortRequestBuilder + + return SortRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def total_row_range(self) -> TotalRowRangeRequestBuilder: + """ + Provides operations to call the totalRowRange method. + """ + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + + return TotalRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheet(self) -> WorksheetRequestBuilder: + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookTable entity. + """ + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + + return WorksheetRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookTableItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableItemRequestBuilderGetQueryParameters(): + """ + Collection of tables that are part of the worksheet. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookTableItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookTableItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookTableItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/worksheet/worksheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..6986631c847 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item/worksheet/worksheet_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_worksheet import WorkbookWorksheet + +class WorksheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/{workbookTable%2Did}/worksheet{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + The worksheet containing the current table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The worksheet containing the current table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> WorksheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorksheetRequestBuilderGetQueryParameters(): + """ + The worksheet containing the current table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py new file mode 100644 index 00000000000..6853bd0a882 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/clear_filters/clear_filters_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + +class ClearFiltersRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the clearFilters method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ClearFiltersRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/clearFilters", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Clears all the filters currently applied on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/table-clearfilters?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Clears all the filters currently applied on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ClearFiltersRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ClearFiltersRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ClearFiltersRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ClearFiltersRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/columns/columns_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/columns/columns_request_builder.py new file mode 100644 index 00000000000..aebf546e841 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/columns/columns_request_builder.py @@ -0,0 +1,182 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_table_column import WorkbookTableColumn + from ..............models.workbook_table_column_collection_response import WorkbookTableColumnCollectionResponse + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/columns{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableColumnCollectionResponse]: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumnCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_column_collection_response import WorkbookTableColumnCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookTableColumnCollectionResponse, error_mapping) + + async def post(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableColumn]: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableColumn] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_column import WorkbookTableColumn + + return await self.request_adapter.send_async(request_info, WorkbookTableColumn, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the columns in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookTableColumn, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ColumnsRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the columns in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py new file mode 100644 index 00000000000..2f4c9c61a44 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/convert_to_range/convert_to_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class ConvertToRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the convertToRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ConvertToRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/convertToRange", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Converts the table into a normal range of cells. All data is preserved. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-converttorange?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Converts the table into a normal range of cells. All data is preserved. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ConvertToRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ConvertToRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ConvertToRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ConvertToRangeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py new file mode 100644 index 00000000000..1e57caa3bff --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/data_body_range/data_body_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class DataBodyRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the dataBodyRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DataBodyRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/dataBodyRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with the data body of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-databodyrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with the data body of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DataBodyRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DataBodyRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DataBodyRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DataBodyRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py new file mode 100644 index 00000000000..6cb324a8b39 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/header_row_range/header_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class HeaderRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the headerRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new HeaderRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/headerRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with header row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-headerrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with header row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> HeaderRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: HeaderRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return HeaderRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class HeaderRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/item_at_with_index_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/item_at_with_index_request_builder.py new file mode 100644 index 00000000000..dfa5eeebfbe --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/item_at_with_index_request_builder.py @@ -0,0 +1,193 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .............models.o_data_errors.o_data_error import ODataError + from .............models.workbook_table import WorkbookTable + from .clear_filters.clear_filters_request_builder import ClearFiltersRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder + from .convert_to_range.convert_to_range_request_builder import ConvertToRangeRequestBuilder + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + from .range.range_request_builder import RangeRequestBuilder + from .reapply_filters.reapply_filters_request_builder import ReapplyFiltersRequestBuilder + from .rows.rows_request_builder import RowsRequestBuilder + from .sort.sort_request_builder import SortRequestBuilder + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + +class ItemAtWithIndexRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the itemAt method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], index: Optional[int] = None) -> None: + """ + Instantiates a new ItemAtWithIndexRequestBuilder and sets the default values. + param index: Usage: index={index} + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['index'] = str(index) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTable]: + """ + Invoke function itemAt + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTable] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .............models.workbook_table import WorkbookTable + + return await self.request_adapter.send_async(request_info, WorkbookTable, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function itemAt + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ItemAtWithIndexRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemAtWithIndexRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemAtWithIndexRequestBuilder(self.request_adapter, raw_url) + + @property + def clear_filters(self) -> ClearFiltersRequestBuilder: + """ + Provides operations to call the clearFilters method. + """ + from .clear_filters.clear_filters_request_builder import ClearFiltersRequestBuilder + + return ClearFiltersRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.workbookTable entity. + """ + from .columns.columns_request_builder import ColumnsRequestBuilder + + return ColumnsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def convert_to_range(self) -> ConvertToRangeRequestBuilder: + """ + Provides operations to call the convertToRange method. + """ + from .convert_to_range.convert_to_range_request_builder import ConvertToRangeRequestBuilder + + return ConvertToRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def data_body_range(self) -> DataBodyRangeRequestBuilder: + """ + Provides operations to call the dataBodyRange method. + """ + from .data_body_range.data_body_range_request_builder import DataBodyRangeRequestBuilder + + return DataBodyRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def header_row_range(self) -> HeaderRowRangeRequestBuilder: + """ + Provides operations to call the headerRowRange method. + """ + from .header_row_range.header_row_range_request_builder import HeaderRowRangeRequestBuilder + + return HeaderRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def reapply_filters(self) -> ReapplyFiltersRequestBuilder: + """ + Provides operations to call the reapplyFilters method. + """ + from .reapply_filters.reapply_filters_request_builder import ReapplyFiltersRequestBuilder + + return ReapplyFiltersRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def rows(self) -> RowsRequestBuilder: + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + """ + from .rows.rows_request_builder import RowsRequestBuilder + + return RowsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def sort(self) -> SortRequestBuilder: + """ + Provides operations to manage the sort property of the microsoft.graph.workbookTable entity. + """ + from .sort.sort_request_builder import SortRequestBuilder + + return SortRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def total_row_range(self) -> TotalRowRangeRequestBuilder: + """ + Provides operations to call the totalRowRange method. + """ + from .total_row_range.total_row_range_request_builder import TotalRowRangeRequestBuilder + + return TotalRowRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def worksheet(self) -> WorksheetRequestBuilder: + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookTable entity. + """ + from .worksheet.worksheet_request_builder import WorksheetRequestBuilder + + return WorksheetRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemAtWithIndexRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/range/range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/range/range_request_builder.py new file mode 100644 index 00000000000..815dfbebff3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/range/range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class RangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the range method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/range()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Get the range object associated with the entire table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-range?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Get the range object associated with the entire table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py new file mode 100644 index 00000000000..2c611f589fe --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/reapply_filters/reapply_filters_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + +class ReapplyFiltersRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the reapplyFilters method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReapplyFiltersRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/reapplyFilters", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Reapplies all the filters currently on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/table-reapplyfilters?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Reapplies all the filters currently on the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ReapplyFiltersRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReapplyFiltersRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReapplyFiltersRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReapplyFiltersRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/rows/rows_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/rows/rows_request_builder.py new file mode 100644 index 00000000000..edd1f4dac2e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/rows/rows_request_builder.py @@ -0,0 +1,182 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_table_row import WorkbookTableRow + from ..............models.workbook_table_row_collection_response import WorkbookTableRowCollectionResponse + +class RowsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the rows property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RowsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/rows{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[RowsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableRowCollectionResponse]: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRowCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_row_collection_response import WorkbookTableRowCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookTableRowCollectionResponse, error_mapping) + + async def post(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableRow]: + """ + Create new navigation property to rows for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableRow] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_row import WorkbookTableRow + + return await self.request_adapter.send_async(request_info, WorkbookTableRow, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RowsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of all the rows in the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookTableRow, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to rows for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RowsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RowsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RowsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RowsRequestBuilderGetQueryParameters(): + """ + Represents a collection of all the rows in the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class RowsRequestBuilderGetRequestConfiguration(RequestConfiguration[RowsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RowsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/sort/sort_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/sort/sort_request_builder.py new file mode 100644 index 00000000000..1ee6296afb8 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/sort/sort_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_table_sort import WorkbookTableSort + +class SortRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sort property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SortRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/sort{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property sort for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[SortRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableSort]: + """ + Represents the sorting for the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableSort] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_sort import WorkbookTableSort + + return await self.request_adapter.send_async(request_info, WorkbookTableSort, error_mapping) + + async def patch(self,body: WorkbookTableSort, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTableSort]: + """ + Update the navigation property sort in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableSort] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_table_sort import WorkbookTableSort + + return await self.request_adapter.send_async(request_info, WorkbookTableSort, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property sort for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SortRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents the sorting for the table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookTableSort, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property sort in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SortRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SortRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SortRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SortRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SortRequestBuilderGetQueryParameters(): + """ + Represents the sorting for the table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class SortRequestBuilderGetRequestConfiguration(RequestConfiguration[SortRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SortRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py new file mode 100644 index 00000000000..116c362c2b9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/total_row_range/total_row_range_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_range import WorkbookRange + +class TotalRowRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the totalRowRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TotalRowRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/totalRowRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Gets the range object associated with totals row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + Find more info here: https://learn.microsoft.com/graph/api/table-totalrowrange?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Gets the range object associated with totals row of the table. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> TotalRowRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TotalRowRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TotalRowRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class TotalRowRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/worksheet/worksheet_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/worksheet/worksheet_request_builder.py new file mode 100644 index 00000000000..f724b174498 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/item_at_with_index/worksheet/worksheet_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..............models.o_data_errors.o_data_error import ODataError + from ..............models.workbook_worksheet import WorkbookWorksheet + +class WorksheetRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheet property of the microsoft.graph.workbookTable entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables/itemAt(index={index})/worksheet{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + The worksheet containing the current table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..............models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The worksheet containing the current table. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> WorksheetRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class WorksheetRequestBuilderGetQueryParameters(): + """ + The worksheet containing the current table. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorksheetRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/tables_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/tables_request_builder.py new file mode 100644 index 00000000000..3ed49dcf9d5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/tables/tables_request_builder.py @@ -0,0 +1,230 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_table import WorkbookTable + from ............models.workbook_table_collection_response import WorkbookTableCollectionResponse + from .add.add_request_builder import AddRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_table_item_request_builder import WorkbookTableItemRequestBuilder + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + +class TablesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the tables property of the microsoft.graph.workbookWorksheet entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new TablesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/tables{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_table_id(self,workbook_table_id: str) -> WorkbookTableItemRequestBuilder: + """ + Provides operations to manage the tables property of the microsoft.graph.workbookWorksheet entity. + param workbook_table_id: The unique identifier of workbookTable + Returns: WorkbookTableItemRequestBuilder + """ + if not workbook_table_id: + raise TypeError("workbook_table_id cannot be null.") + from .item.workbook_table_item_request_builder import WorkbookTableItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookTable%2Did"] = workbook_table_id + return WorkbookTableItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[TablesRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookTableCollectionResponse]: + """ + Collection of tables that are part of the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTableCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table_collection_response import WorkbookTableCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookTableCollectionResponse, error_mapping) + + def item_at_with_index(self,index: int) -> ItemAtWithIndexRequestBuilder: + """ + Provides operations to call the itemAt method. + param index: Usage: index={index} + Returns: ItemAtWithIndexRequestBuilder + """ + if not index: + raise TypeError("index cannot be null.") + from .item_at_with_index.item_at_with_index_request_builder import ItemAtWithIndexRequestBuilder + + return ItemAtWithIndexRequestBuilder(self.request_adapter, self.path_parameters, index) + + async def post(self,body: WorkbookTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookTable]: + """ + Create new navigation property to tables for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookTable] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_table import WorkbookTable + + return await self.request_adapter.send_async(request_info, WorkbookTable, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[TablesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection of tables that are part of the worksheet. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookTable, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to tables for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> TablesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: TablesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return TablesRequestBuilder(self.request_adapter, raw_url) + + @property + def add(self) -> AddRequestBuilder: + """ + Provides operations to call the add method. + """ + from .add.add_request_builder import AddRequestBuilder + + return AddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to call the count method. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class TablesRequestBuilderGetQueryParameters(): + """ + Collection of tables that are part of the worksheet. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class TablesRequestBuilderGetRequestConfiguration(RequestConfiguration[TablesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class TablesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/used_range/used_range_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/used_range/used_range_request_builder.py new file mode 100644 index 00000000000..3071b4cf3ba --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/used_range/used_range_request_builder.py @@ -0,0 +1,80 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class UsedRangeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the usedRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new UsedRangeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/usedRange()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Invoke function usedRange + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function usedRange + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> UsedRangeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: UsedRangeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return UsedRangeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class UsedRangeRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/used_range_with_values_only/used_range_with_values_only_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/used_range_with_values_only/used_range_with_values_only_request_builder.py new file mode 100644 index 00000000000..0258051cf92 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/used_range_with_values_only/used_range_with_values_only_request_builder.py @@ -0,0 +1,83 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + from ............models.workbook_range import WorkbookRange + +class UsedRangeWithValuesOnlyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the usedRange method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], values_only: Optional[bool] = None) -> None: + """ + Instantiates a new UsedRangeWithValuesOnlyRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param values_only: Usage: valuesOnly={valuesOnly} + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['valuesOnly'] = str(values_only) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}/usedRange(valuesOnly={valuesOnly})", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookRange]: + """ + Invoke function usedRange + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookRange] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.workbook_range import WorkbookRange + + return await self.request_adapter.send_async(request_info, WorkbookRange, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke function usedRange + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> UsedRangeWithValuesOnlyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: UsedRangeWithValuesOnlyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return UsedRangeWithValuesOnlyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class UsedRangeWithValuesOnlyRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/workbook_worksheet_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/workbook_worksheet_item_request_builder.py new file mode 100644 index 00000000000..dd1cbb6896b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/item/workbook_worksheet_item_request_builder.py @@ -0,0 +1,299 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.workbook_worksheet import WorkbookWorksheet + from .cell_with_row_with_column.cell_with_row_with_column_request_builder import CellWithRowWithColumnRequestBuilder + from .charts.charts_request_builder import ChartsRequestBuilder + from .names.names_request_builder import NamesRequestBuilder + from .pivot_tables.pivot_tables_request_builder import PivotTablesRequestBuilder + from .protection.protection_request_builder import ProtectionRequestBuilder + from .range.range_request_builder import RangeRequestBuilder + from .range_with_address.range_with_address_request_builder import RangeWithAddressRequestBuilder + from .tables.tables_request_builder import TablesRequestBuilder + from .used_range.used_range_request_builder import UsedRangeRequestBuilder + from .used_range_with_values_only.used_range_with_values_only_request_builder import UsedRangeWithValuesOnlyRequestBuilder + +class WorkbookWorksheetItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheets property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorkbookWorksheetItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets/{workbookWorksheet%2Did}{?%24expand,%24select}", path_parameters) + + def cell_with_row_with_column(self,column: int, row: int) -> CellWithRowWithColumnRequestBuilder: + """ + Provides operations to call the cell method. + param column: Usage: column={column} + param row: Usage: row={row} + Returns: CellWithRowWithColumnRequestBuilder + """ + if not column: + raise TypeError("column cannot be null.") + if not row: + raise TypeError("row cannot be null.") + from .cell_with_row_with_column.cell_with_row_with_column_request_builder import CellWithRowWithColumnRequestBuilder + + return CellWithRowWithColumnRequestBuilder(self.request_adapter, self.path_parameters, column, row) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property worksheets for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorkbookWorksheetItemRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + Represents a collection of worksheets associated with the workbook. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + async def patch(self,body: WorkbookWorksheet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + Update the navigation property worksheets in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def range_with_address(self,address: str) -> RangeWithAddressRequestBuilder: + """ + Provides operations to call the range method. + param address: Usage: address='{address}' + Returns: RangeWithAddressRequestBuilder + """ + if not address: + raise TypeError("address cannot be null.") + from .range_with_address.range_with_address_request_builder import RangeWithAddressRequestBuilder + + return RangeWithAddressRequestBuilder(self.request_adapter, self.path_parameters, address) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property worksheets for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorkbookWorksheetItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of worksheets associated with the workbook. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: WorkbookWorksheet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property worksheets in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def used_range_with_values_only(self,values_only: bool) -> UsedRangeWithValuesOnlyRequestBuilder: + """ + Provides operations to call the usedRange method. + param values_only: Usage: valuesOnly={valuesOnly} + Returns: UsedRangeWithValuesOnlyRequestBuilder + """ + if not values_only: + raise TypeError("values_only cannot be null.") + from .used_range_with_values_only.used_range_with_values_only_request_builder import UsedRangeWithValuesOnlyRequestBuilder + + return UsedRangeWithValuesOnlyRequestBuilder(self.request_adapter, self.path_parameters, values_only) + + def with_url(self,raw_url: str) -> WorkbookWorksheetItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorkbookWorksheetItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorkbookWorksheetItemRequestBuilder(self.request_adapter, raw_url) + + @property + def charts(self) -> ChartsRequestBuilder: + """ + Provides operations to manage the charts property of the microsoft.graph.workbookWorksheet entity. + """ + from .charts.charts_request_builder import ChartsRequestBuilder + + return ChartsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def names(self) -> NamesRequestBuilder: + """ + Provides operations to manage the names property of the microsoft.graph.workbookWorksheet entity. + """ + from .names.names_request_builder import NamesRequestBuilder + + return NamesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def pivot_tables(self) -> PivotTablesRequestBuilder: + """ + Provides operations to manage the pivotTables property of the microsoft.graph.workbookWorksheet entity. + """ + from .pivot_tables.pivot_tables_request_builder import PivotTablesRequestBuilder + + return PivotTablesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def protection(self) -> ProtectionRequestBuilder: + """ + Provides operations to manage the protection property of the microsoft.graph.workbookWorksheet entity. + """ + from .protection.protection_request_builder import ProtectionRequestBuilder + + return ProtectionRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def range(self) -> RangeRequestBuilder: + """ + Provides operations to call the range method. + """ + from .range.range_request_builder import RangeRequestBuilder + + return RangeRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def tables(self) -> TablesRequestBuilder: + """ + Provides operations to manage the tables property of the microsoft.graph.workbookWorksheet entity. + """ + from .tables.tables_request_builder import TablesRequestBuilder + + return TablesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def used_range(self) -> UsedRangeRequestBuilder: + """ + Provides operations to call the usedRange method. + """ + from .used_range.used_range_request_builder import UsedRangeRequestBuilder + + return UsedRangeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorkbookWorksheetItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookWorksheetItemRequestBuilderGetQueryParameters(): + """ + Represents a collection of worksheets associated with the workbook. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class WorkbookWorksheetItemRequestBuilderGetRequestConfiguration(RequestConfiguration[WorkbookWorksheetItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorkbookWorksheetItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/worksheets_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/worksheets_request_builder.py new file mode 100644 index 00000000000..ed10f2aa915 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/item/workbook/worksheets/worksheets_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.workbook_worksheet import WorkbookWorksheet + from ..........models.workbook_worksheet_collection_response import WorkbookWorksheetCollectionResponse + from .add.add_request_builder import AddRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .item.workbook_worksheet_item_request_builder import WorkbookWorksheetItemRequestBuilder + +class WorksheetsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the worksheets property of the microsoft.graph.workbook entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new WorksheetsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items/{driveItem%2Did}/workbook/worksheets{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_workbook_worksheet_id(self,workbook_worksheet_id: str) -> WorkbookWorksheetItemRequestBuilder: + """ + Provides operations to manage the worksheets property of the microsoft.graph.workbook entity. + param workbook_worksheet_id: The unique identifier of workbookWorksheet + Returns: WorkbookWorksheetItemRequestBuilder + """ + if not workbook_worksheet_id: + raise TypeError("workbook_worksheet_id cannot be null.") + from .item.workbook_worksheet_item_request_builder import WorkbookWorksheetItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["workbookWorksheet%2Did"] = workbook_worksheet_id + return WorkbookWorksheetItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[WorksheetsRequestBuilderGetQueryParameters]] = None) -> Optional[WorkbookWorksheetCollectionResponse]: + """ + Represents a collection of worksheets associated with the workbook. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheetCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_worksheet_collection_response import WorkbookWorksheetCollectionResponse + + return await self.request_adapter.send_async(request_info, WorkbookWorksheetCollectionResponse, error_mapping) + + async def post(self,body: WorkbookWorksheet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[WorkbookWorksheet]: + """ + Create new navigation property to worksheets for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[WorkbookWorksheet] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.workbook_worksheet import WorkbookWorksheet + + return await self.request_adapter.send_async(request_info, WorkbookWorksheet, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[WorksheetsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Represents a collection of worksheets associated with the workbook. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: WorkbookWorksheet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to worksheets for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> WorksheetsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: WorksheetsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return WorksheetsRequestBuilder(self.request_adapter, raw_url) + + @property + def add(self) -> AddRequestBuilder: + """ + Provides operations to call the add method. + """ + from .add.add_request_builder import AddRequestBuilder + + return AddRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class WorksheetsRequestBuilderGetQueryParameters(): + """ + Represents a collection of worksheets associated with the workbook. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class WorksheetsRequestBuilderGetRequestConfiguration(RequestConfiguration[WorksheetsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class WorksheetsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/items/items_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/items/items_request_builder.py new file mode 100644 index 00000000000..6b8f4a4be6a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/items/items_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.drive_item import DriveItem + from .......models.drive_item_collection_response import DriveItemCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.drive_item_item_request_builder import DriveItemItemRequestBuilder + +class ItemsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the items property of the microsoft.graph.drive entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ItemsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/items{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_drive_item_id(self,drive_item_id: str) -> DriveItemItemRequestBuilder: + """ + Provides operations to manage the items property of the microsoft.graph.drive entity. + param drive_item_id: The unique identifier of driveItem + Returns: DriveItemItemRequestBuilder + """ + if not drive_item_id: + raise TypeError("drive_item_id cannot be null.") + from .item.drive_item_item_request_builder import DriveItemItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["driveItem%2Did"] = drive_item_id + return DriveItemItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ItemsRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItemCollectionResponse]: + """ + All items contained in the drive. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.drive_item_collection_response import DriveItemCollectionResponse + + return await self.request_adapter.send_async(request_info, DriveItemCollectionResponse, error_mapping) + + async def post(self,body: DriveItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + Create new navigation property to items for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ItemsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + All items contained in the drive. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: DriveItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to items for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ItemsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemsRequestBuilderGetQueryParameters(): + """ + All items contained in the drive. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ItemsRequestBuilderGetRequestConfiguration(RequestConfiguration[ItemsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ItemsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/last_modified_by_user_request_builder.py new file mode 100644 index 00000000000..e75839c309a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/last_modified_by_user_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .......models.user import User + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class LastModifiedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/lastModifiedByUser{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]] = None) -> Optional[User]: + """ + Identity of the user who last modified the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[User] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.user import User + + return await self.request_adapter.send_async(request_info, User, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Identity of the user who last modified the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> LastModifiedByUserRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LastModifiedByUserRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LastModifiedByUserRequestBuilder(self.request_adapter, raw_url) + + @property + def mailbox_settings(self) -> MailboxSettingsRequestBuilder: + """ + The mailboxSettings property + """ + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + + return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LastModifiedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who last modified the item. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LastModifiedByUserRequestBuilderGetRequestConfiguration(RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py new file mode 100644 index 00000000000..d84b33a9ed2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -0,0 +1,151 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.mailbox_settings import MailboxSettings + from ........models.o_data_errors.o_data_error import ODataError + +class MailboxSettingsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/lastModifiedByUser/mailboxSettings + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/lastModifiedByUser/mailboxSettings{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + async def patch(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MailboxSettingsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MailboxSettingsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MailboxSettingsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MailboxSettingsRequestBuilderGetQueryParameters(): + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MailboxSettingsRequestBuilderGetRequestConfiguration(RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MailboxSettingsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..0e049aa9850 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/lastModifiedByUser/serviceProvisioningErrors/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..0a4324a46fc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,146 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/lastModifiedByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/columns_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/columns_request_builder.py new file mode 100644 index 00000000000..8596bd67cc1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/columns_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.column_definition import ColumnDefinition + from ........models.column_definition_collection_response import ColumnDefinitionCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.column_definition_item_request_builder import ColumnDefinitionItemRequestBuilder + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/columns{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionItemRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.list entity. + param column_definition_id: The unique identifier of columnDefinition + Returns: ColumnDefinitionItemRequestBuilder + """ + if not column_definition_id: + raise TypeError("column_definition_id cannot be null.") + from .item.column_definition_item_request_builder import ColumnDefinitionItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["columnDefinition%2Did"] = column_definition_id + return ColumnDefinitionItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + The collection of field definitions for this list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinitionCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.column_definition_collection_response import ColumnDefinitionCollectionResponse + + return await self.request_adapter.send_async(request_info, ColumnDefinitionCollectionResponse, error_mapping) + + async def post(self,body: ColumnDefinition, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ColumnDefinition]: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.column_definition import ColumnDefinition + + return await self.request_adapter.send_async(request_info, ColumnDefinition, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of field definitions for this list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ColumnDefinition, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ColumnsRequestBuilderGetQueryParameters(): + """ + The collection of field definitions for this list. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/count/count_request_builder.py new file mode 100644 index 00000000000..f5d7edc797b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/columns/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/item/column_definition_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/item/column_definition_item_request_builder.py new file mode 100644 index 00000000000..71b7c0a1852 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/item/column_definition_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.column_definition import ColumnDefinition + from .........models.o_data_errors.o_data_error import ODataError + from .source_column.source_column_request_builder import SourceColumnRequestBuilder + +class ColumnDefinitionItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/columns/{columnDefinition%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property columns for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnDefinitionItemRequestBuilderGetQueryParameters]] = None) -> Optional[ColumnDefinition]: + """ + The collection of field definitions for this list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.column_definition import ColumnDefinition + + return await self.request_adapter.send_async(request_info, ColumnDefinition, error_mapping) + + async def patch(self,body: ColumnDefinition, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ColumnDefinition]: + """ + Update the navigation property columns in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.column_definition import ColumnDefinition + + return await self.request_adapter.send_async(request_info, ColumnDefinition, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property columns for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnDefinitionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of field definitions for this list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ColumnDefinition, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property columns in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnDefinitionItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnDefinitionItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnDefinitionItemRequestBuilder(self.request_adapter, raw_url) + + @property + def source_column(self) -> SourceColumnRequestBuilder: + """ + Provides operations to manage the sourceColumn property of the microsoft.graph.columnDefinition entity. + """ + from .source_column.source_column_request_builder import SourceColumnRequestBuilder + + return SourceColumnRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnDefinitionItemRequestBuilderGetQueryParameters(): + """ + The collection of field definitions for this list. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ColumnDefinitionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnDefinitionItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnDefinitionItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/item/source_column/source_column_request_builder.py new file mode 100644 index 00000000000..d342afd8d00 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/columns/item/source_column/source_column_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.column_definition import ColumnDefinition + from ..........models.o_data_errors.o_data_error import ODataError + +class SourceColumnRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sourceColumn property of the microsoft.graph.columnDefinition entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SourceColumnRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/columns/{columnDefinition%2Did}/sourceColumn{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[SourceColumnRequestBuilderGetQueryParameters]] = None) -> Optional[ColumnDefinition]: + """ + The source column for the content type column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.column_definition import ColumnDefinition + + return await self.request_adapter.send_async(request_info, ColumnDefinition, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SourceColumnRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The source column for the content type column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> SourceColumnRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SourceColumnRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SourceColumnRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SourceColumnRequestBuilderGetQueryParameters(): + """ + The source column for the content type column. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class SourceColumnRequestBuilderGetRequestConfiguration(RequestConfiguration[SourceColumnRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy/add_copy_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy/add_copy_post_request_body.py new file mode 100644 index 00000000000..3538dd762b2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy/add_copy_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class AddCopyPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The contentType property + content_type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddCopyPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddCopyPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddCopyPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "contentType": lambda n : setattr(self, 'content_type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("contentType", self.content_type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy/add_copy_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy/add_copy_request_builder.py new file mode 100644 index 00000000000..5f8aae3cee9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy/add_copy_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.content_type import ContentType + from .........models.o_data_errors.o_data_error import ODataError + from .add_copy_post_request_body import AddCopyPostRequestBody + +class AddCopyRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the addCopy method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddCopyRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/addCopy", path_parameters) + + async def post(self,body: AddCopyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ContentType]: + """ + Add a copy of a content type from a site to a list. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentType] + Find more info here: https://learn.microsoft.com/graph/api/contenttype-addcopy?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.content_type import ContentType + + return await self.request_adapter.send_async(request_info, ContentType, error_mapping) + + def to_post_request_information(self,body: AddCopyPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Add a copy of a content type from a site to a list. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddCopyRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddCopyRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddCopyRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddCopyRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_post_request_body.py new file mode 100644 index 00000000000..1d8e329fccf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_post_request_body.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class AddCopyFromContentTypeHubPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The contentTypeId property + content_type_id: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AddCopyFromContentTypeHubPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AddCopyFromContentTypeHubPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AddCopyFromContentTypeHubPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "contentTypeId": lambda n : setattr(self, 'content_type_id', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("contentTypeId", self.content_type_id) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py new file mode 100644 index 00000000000..6d83f102c03 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/add_copy_from_content_type_hub/add_copy_from_content_type_hub_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.content_type import ContentType + from .........models.o_data_errors.o_data_error import ODataError + from .add_copy_from_content_type_hub_post_request_body import AddCopyFromContentTypeHubPostRequestBody + +class AddCopyFromContentTypeHubRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the addCopyFromContentTypeHub method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AddCopyFromContentTypeHubRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/addCopyFromContentTypeHub", path_parameters) + + async def post(self,body: AddCopyFromContentTypeHubPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ContentType]: + """ + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentType] + Find more info here: https://learn.microsoft.com/graph/api/contenttype-addcopyfromcontenttypehub?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.content_type import ContentType + + return await self.request_adapter.send_async(request_info, ContentType, error_mapping) + + def to_post_request_information(self,body: AddCopyFromContentTypeHubPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Add or sync a copy of a published content type from the content type hub to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: getCompatibleHubContentTypes and the blog post Syntex Product Updates – August 2021. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AddCopyFromContentTypeHubRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AddCopyFromContentTypeHubRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AddCopyFromContentTypeHubRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AddCopyFromContentTypeHubRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/content_types_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/content_types_request_builder.py new file mode 100644 index 00000000000..4bb3d4745f1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/content_types_request_builder.py @@ -0,0 +1,237 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.content_type import ContentType + from ........models.content_type_collection_response import ContentTypeCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .add_copy.add_copy_request_builder import AddCopyRequestBuilder + from .add_copy_from_content_type_hub.add_copy_from_content_type_hub_request_builder import AddCopyFromContentTypeHubRequestBuilder + from .count.count_request_builder import CountRequestBuilder + from .get_compatible_hub_content_types.get_compatible_hub_content_types_request_builder import GetCompatibleHubContentTypesRequestBuilder + from .item.content_type_item_request_builder import ContentTypeItemRequestBuilder + +class ContentTypesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentTypes property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentTypesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_content_type_id(self,content_type_id: str) -> ContentTypeItemRequestBuilder: + """ + Provides operations to manage the contentTypes property of the microsoft.graph.list entity. + param content_type_id: The unique identifier of contentType + Returns: ContentTypeItemRequestBuilder + """ + if not content_type_id: + raise TypeError("content_type_id cannot be null.") + from .item.content_type_item_request_builder import ContentTypeItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["contentType%2Did"] = content_type_id + return ContentTypeItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentTypesRequestBuilderGetQueryParameters]] = None) -> Optional[ContentTypeCollectionResponse]: + """ + The collection of content types present in this list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentTypeCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.content_type_collection_response import ContentTypeCollectionResponse + + return await self.request_adapter.send_async(request_info, ContentTypeCollectionResponse, error_mapping) + + async def post(self,body: ContentType, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ContentType]: + """ + Create new navigation property to contentTypes for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentType] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.content_type import ContentType + + return await self.request_adapter.send_async(request_info, ContentType, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentTypesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of content types present in this list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ContentType, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to contentTypes for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ContentTypesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentTypesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentTypesRequestBuilder(self.request_adapter, raw_url) + + @property + def add_copy(self) -> AddCopyRequestBuilder: + """ + Provides operations to call the addCopy method. + """ + from .add_copy.add_copy_request_builder import AddCopyRequestBuilder + + return AddCopyRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def add_copy_from_content_type_hub(self) -> AddCopyFromContentTypeHubRequestBuilder: + """ + Provides operations to call the addCopyFromContentTypeHub method. + """ + from .add_copy_from_content_type_hub.add_copy_from_content_type_hub_request_builder import AddCopyFromContentTypeHubRequestBuilder + + return AddCopyFromContentTypeHubRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def get_compatible_hub_content_types(self) -> GetCompatibleHubContentTypesRequestBuilder: + """ + Provides operations to call the getCompatibleHubContentTypes method. + """ + from .get_compatible_hub_content_types.get_compatible_hub_content_types_request_builder import GetCompatibleHubContentTypesRequestBuilder + + return GetCompatibleHubContentTypesRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentTypesRequestBuilderGetQueryParameters(): + """ + The collection of content types present in this list. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ContentTypesRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentTypesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentTypesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/count/count_request_builder.py new file mode 100644 index 00000000000..5d200b0bbcc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py new file mode 100644 index 00000000000..994894aa429 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.content_type import ContentType + +from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetCompatibleHubContentTypesGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ContentType]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GetCompatibleHubContentTypesGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetCompatibleHubContentTypesGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetCompatibleHubContentTypesGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.content_type import ContentType + + from .........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .........models.content_type import ContentType + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ContentType)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py new file mode 100644 index 00000000000..a8c7b1224ae --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/get_compatible_hub_content_types/get_compatible_hub_content_types_request_builder.py @@ -0,0 +1,137 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse + +class GetCompatibleHubContentTypesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the getCompatibleHubContentTypes method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GetCompatibleHubContentTypesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/getCompatibleHubContentTypes(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[GetCompatibleHubContentTypesRequestBuilderGetQueryParameters]] = None) -> Optional[GetCompatibleHubContentTypesGetResponse]: + """ + Get a list of compatible content types from the content type hub that can be added to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: addCopyFromContentTypeHub and the blog post Syntex Product Updates – August 2021. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[GetCompatibleHubContentTypesGetResponse] + Find more info here: https://learn.microsoft.com/graph/api/contenttype-getcompatiblehubcontenttypes?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .get_compatible_hub_content_types_get_response import GetCompatibleHubContentTypesGetResponse + + return await self.request_adapter.send_async(request_info, GetCompatibleHubContentTypesGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GetCompatibleHubContentTypesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get a list of compatible content types from the content type hub that can be added to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: addCopyFromContentTypeHub and the blog post Syntex Product Updates – August 2021. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> GetCompatibleHubContentTypesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GetCompatibleHubContentTypesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GetCompatibleHubContentTypesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GetCompatibleHubContentTypesRequestBuilderGetQueryParameters(): + """ + Get a list of compatible content types from the content type hub that can be added to a target site or a list. This method is part of the content type publishing changes to optimize the syncing of published content types to sites and lists, effectively switching from a 'push everywhere' to 'pull as needed' approach. The method allows users to pull content types directly from the content type hub to a site or list. For more information, see contentType: addCopyFromContentTypeHub and the blog post Syntex Product Updates – August 2021. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class GetCompatibleHubContentTypesRequestBuilderGetRequestConfiguration(RequestConfiguration[GetCompatibleHubContentTypesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_post_request_body.py new file mode 100644 index 00000000000..174f3e6bd67 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_post_request_body.py @@ -0,0 +1,53 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class AssociateWithHubSitesPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The hubSiteUrls property + hub_site_urls: Optional[List[str]] = None + # The propagateToExistingLists property + propagate_to_existing_lists: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> AssociateWithHubSitesPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: AssociateWithHubSitesPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return AssociateWithHubSitesPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "hubSiteUrls": lambda n : setattr(self, 'hub_site_urls', n.get_collection_of_primitive_values(str)), + "propagateToExistingLists": lambda n : setattr(self, 'propagate_to_existing_lists', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_collection_of_primitive_values("hubSiteUrls", self.hub_site_urls) + writer.write_bool_value("propagateToExistingLists", self.propagate_to_existing_lists) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py new file mode 100644 index 00000000000..5523f4ed19d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/associate_with_hub_sites/associate_with_hub_sites_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from .associate_with_hub_sites_post_request_body import AssociateWithHubSitesPostRequestBody + +class AssociateWithHubSitesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the associateWithHubSites method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AssociateWithHubSitesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/associateWithHubSites", path_parameters) + + async def post(self,body: AssociateWithHubSitesPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Associate a published content type present in a content type hub with a list of hub sites. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/contenttype-associatewithhubsites?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: AssociateWithHubSitesPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Associate a published content type present in a content type hub with a list of hub sites. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> AssociateWithHubSitesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AssociateWithHubSitesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AssociateWithHubSitesRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AssociateWithHubSitesRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base/base_request_builder_.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base/base_request_builder_.py new file mode 100644 index 00000000000..3b9720784ba --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base/base_request_builder_.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.content_type import ContentType + from ..........models.o_data_errors.o_data_error import ODataError + +class BaseRequestBuilder_(BaseRequestBuilder): + """ + Provides operations to manage the base property of the microsoft.graph.contentType entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BaseRequestBuilder_ and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/base{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[BaseRequestBuilderGetQueryParameters]] = None) -> Optional[ContentType]: + """ + Parent contentType from which this content type is derived. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentType] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.content_type import ContentType + + return await self.request_adapter.send_async(request_info, ContentType, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[BaseRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Parent contentType from which this content type is derived. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> BaseRequestBuilder_: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BaseRequestBuilder_ + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BaseRequestBuilder_(self.request_adapter, raw_url) + + @dataclass + class BaseRequestBuilderGetQueryParameters(): + """ + Parent contentType from which this content type is derived. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class BaseRequestBuilderGetRequestConfiguration(RequestConfiguration[BaseRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/base_types_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/base_types_request_builder.py new file mode 100644 index 00000000000..cbc1acf0475 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/base_types_request_builder.py @@ -0,0 +1,161 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.content_type_collection_response import ContentTypeCollectionResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.content_type_item_request_builder import ContentTypeItemRequestBuilder + +class BaseTypesRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the baseTypes property of the microsoft.graph.contentType entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new BaseTypesRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/baseTypes{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_content_type_id1(self,content_type_id1: str) -> ContentTypeItemRequestBuilder: + """ + Provides operations to manage the baseTypes property of the microsoft.graph.contentType entity. + param content_type_id1: The unique identifier of contentType + Returns: ContentTypeItemRequestBuilder + """ + if not content_type_id1: + raise TypeError("content_type_id1 cannot be null.") + from .item.content_type_item_request_builder import ContentTypeItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["contentType%2Did1"] = content_type_id1 + return ContentTypeItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[BaseTypesRequestBuilderGetQueryParameters]] = None) -> Optional[ContentTypeCollectionResponse]: + """ + The collection of content types that are ancestors of this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentTypeCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.content_type_collection_response import ContentTypeCollectionResponse + + return await self.request_adapter.send_async(request_info, ContentTypeCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[BaseTypesRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of content types that are ancestors of this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> BaseTypesRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: BaseTypesRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return BaseTypesRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class BaseTypesRequestBuilderGetQueryParameters(): + """ + The collection of content types that are ancestors of this content type. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class BaseTypesRequestBuilderGetRequestConfiguration(RequestConfiguration[BaseTypesRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/count/count_request_builder.py new file mode 100644 index 00000000000..e67a9353642 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/baseTypes/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/item/content_type_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/item/content_type_item_request_builder.py new file mode 100644 index 00000000000..7f4b674ce47 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/base_types/item/content_type_item_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.content_type import ContentType + from ...........models.o_data_errors.o_data_error import ODataError + +class ContentTypeItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the baseTypes property of the microsoft.graph.contentType entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentTypeItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/baseTypes/{contentType%2Did1}{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentTypeItemRequestBuilderGetQueryParameters]] = None) -> Optional[ContentType]: + """ + The collection of content types that are ancestors of this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentType] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.content_type import ContentType + + return await self.request_adapter.send_async(request_info, ContentType, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentTypeItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of content types that are ancestors of this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ContentTypeItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentTypeItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentTypeItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ContentTypeItemRequestBuilderGetQueryParameters(): + """ + The collection of content types that are ancestors of this content type. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ContentTypeItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentTypeItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/column_links_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/column_links_request_builder.py new file mode 100644 index 00000000000..d081237bb7e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/column_links_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.column_link import ColumnLink + from ..........models.column_link_collection_response import ColumnLinkCollectionResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.column_link_item_request_builder import ColumnLinkItemRequestBuilder + +class ColumnLinksRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columnLinks property of the microsoft.graph.contentType entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnLinksRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/columnLinks{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_column_link_id(self,column_link_id: str) -> ColumnLinkItemRequestBuilder: + """ + Provides operations to manage the columnLinks property of the microsoft.graph.contentType entity. + param column_link_id: The unique identifier of columnLink + Returns: ColumnLinkItemRequestBuilder + """ + if not column_link_id: + raise TypeError("column_link_id cannot be null.") + from .item.column_link_item_request_builder import ColumnLinkItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["columnLink%2Did"] = column_link_id + return ColumnLinkItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnLinksRequestBuilderGetQueryParameters]] = None) -> Optional[ColumnLinkCollectionResponse]: + """ + The collection of columns that are required by this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnLinkCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.column_link_collection_response import ColumnLinkCollectionResponse + + return await self.request_adapter.send_async(request_info, ColumnLinkCollectionResponse, error_mapping) + + async def post(self,body: ColumnLink, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ColumnLink]: + """ + Create new navigation property to columnLinks for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnLink] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.column_link import ColumnLink + + return await self.request_adapter.send_async(request_info, ColumnLink, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnLinksRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of columns that are required by this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ColumnLink, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to columnLinks for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnLinksRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnLinksRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnLinksRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ColumnLinksRequestBuilderGetQueryParameters(): + """ + The collection of columns that are required by this content type. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ColumnLinksRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnLinksRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnLinksRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/count/count_request_builder.py new file mode 100644 index 00000000000..a1a9f6f3cb1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/columnLinks/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/item/column_link_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/item/column_link_item_request_builder.py new file mode 100644 index 00000000000..e26aeef55c1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_links/item/column_link_item_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.column_link import ColumnLink + from ...........models.o_data_errors.o_data_error import ODataError + +class ColumnLinkItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columnLinks property of the microsoft.graph.contentType entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnLinkItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/columnLinks/{columnLink%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property columnLinks for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnLinkItemRequestBuilderGetQueryParameters]] = None) -> Optional[ColumnLink]: + """ + The collection of columns that are required by this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnLink] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.column_link import ColumnLink + + return await self.request_adapter.send_async(request_info, ColumnLink, error_mapping) + + async def patch(self,body: ColumnLink, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ColumnLink]: + """ + Update the navigation property columnLinks in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnLink] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.column_link import ColumnLink + + return await self.request_adapter.send_async(request_info, ColumnLink, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property columnLinks for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnLinkItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of columns that are required by this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ColumnLink, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property columnLinks in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnLinkItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnLinkItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnLinkItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ColumnLinkItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnLinkItemRequestBuilderGetQueryParameters(): + """ + The collection of columns that are required by this content type. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ColumnLinkItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnLinkItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnLinkItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/column_positions_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/column_positions_request_builder.py new file mode 100644 index 00000000000..b3cb5670763 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/column_positions_request_builder.py @@ -0,0 +1,161 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.column_definition_collection_response import ColumnDefinitionCollectionResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.column_definition_item_request_builder import ColumnDefinitionItemRequestBuilder + +class ColumnPositionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columnPositions property of the microsoft.graph.contentType entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnPositionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/columnPositions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionItemRequestBuilder: + """ + Provides operations to manage the columnPositions property of the microsoft.graph.contentType entity. + param column_definition_id: The unique identifier of columnDefinition + Returns: ColumnDefinitionItemRequestBuilder + """ + if not column_definition_id: + raise TypeError("column_definition_id cannot be null.") + from .item.column_definition_item_request_builder import ColumnDefinitionItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["columnDefinition%2Did"] = column_definition_id + return ColumnDefinitionItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnPositionsRequestBuilderGetQueryParameters]] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + Column order information in a content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinitionCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.column_definition_collection_response import ColumnDefinitionCollectionResponse + + return await self.request_adapter.send_async(request_info, ColumnDefinitionCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnPositionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Column order information in a content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ColumnPositionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnPositionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnPositionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ColumnPositionsRequestBuilderGetQueryParameters(): + """ + Column order information in a content type. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ColumnPositionsRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnPositionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/count/count_request_builder.py new file mode 100644 index 00000000000..db1b14b0d39 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/columnPositions/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py new file mode 100644 index 00000000000..b4f09c427c3 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/column_positions/item/column_definition_item_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.column_definition import ColumnDefinition + from ...........models.o_data_errors.o_data_error import ODataError + +class ColumnDefinitionItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columnPositions property of the microsoft.graph.contentType entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/columnPositions/{columnDefinition%2Did}{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnDefinitionItemRequestBuilderGetQueryParameters]] = None) -> Optional[ColumnDefinition]: + """ + Column order information in a content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.column_definition import ColumnDefinition + + return await self.request_adapter.send_async(request_info, ColumnDefinition, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnDefinitionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Column order information in a content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ColumnDefinitionItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnDefinitionItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnDefinitionItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ColumnDefinitionItemRequestBuilderGetQueryParameters(): + """ + Column order information in a content type. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ColumnDefinitionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnDefinitionItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/columns_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/columns_request_builder.py new file mode 100644 index 00000000000..57f9fd94112 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/columns_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.column_definition import ColumnDefinition + from ..........models.column_definition_collection_response import ColumnDefinitionCollectionResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.column_definition_item_request_builder import ColumnDefinitionItemRequestBuilder + +class ColumnsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.contentType entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/columns{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_column_definition_id(self,column_definition_id: str) -> ColumnDefinitionItemRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.contentType entity. + param column_definition_id: The unique identifier of columnDefinition + Returns: ColumnDefinitionItemRequestBuilder + """ + if not column_definition_id: + raise TypeError("column_definition_id cannot be null.") + from .item.column_definition_item_request_builder import ColumnDefinitionItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["columnDefinition%2Did"] = column_definition_id + return ColumnDefinitionItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> Optional[ColumnDefinitionCollectionResponse]: + """ + The collection of column definitions for this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinitionCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.column_definition_collection_response import ColumnDefinitionCollectionResponse + + return await self.request_adapter.send_async(request_info, ColumnDefinitionCollectionResponse, error_mapping) + + async def post(self,body: ColumnDefinition, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ColumnDefinition]: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.column_definition import ColumnDefinition + + return await self.request_adapter.send_async(request_info, ColumnDefinition, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of column definitions for this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ColumnDefinition, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to columns for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ColumnsRequestBuilderGetQueryParameters(): + """ + The collection of column definitions for this content type. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ColumnsRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/count/count_request_builder.py new file mode 100644 index 00000000000..66c9d20cc98 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/columns/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/item/column_definition_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/item/column_definition_item_request_builder.py new file mode 100644 index 00000000000..4a8a82fb765 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/item/column_definition_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.column_definition import ColumnDefinition + from ...........models.o_data_errors.o_data_error import ODataError + from .source_column.source_column_request_builder import SourceColumnRequestBuilder + +class ColumnDefinitionItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the columns property of the microsoft.graph.contentType entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ColumnDefinitionItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/columns/{columnDefinition%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property columns for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ColumnDefinitionItemRequestBuilderGetQueryParameters]] = None) -> Optional[ColumnDefinition]: + """ + The collection of column definitions for this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.column_definition import ColumnDefinition + + return await self.request_adapter.send_async(request_info, ColumnDefinition, error_mapping) + + async def patch(self,body: ColumnDefinition, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ColumnDefinition]: + """ + Update the navigation property columns in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.column_definition import ColumnDefinition + + return await self.request_adapter.send_async(request_info, ColumnDefinition, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property columns for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ColumnDefinitionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of column definitions for this content type. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ColumnDefinition, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property columns in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ColumnDefinitionItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ColumnDefinitionItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ColumnDefinitionItemRequestBuilder(self.request_adapter, raw_url) + + @property + def source_column(self) -> SourceColumnRequestBuilder: + """ + Provides operations to manage the sourceColumn property of the microsoft.graph.columnDefinition entity. + """ + from .source_column.source_column_request_builder import SourceColumnRequestBuilder + + return SourceColumnRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ColumnDefinitionItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnDefinitionItemRequestBuilderGetQueryParameters(): + """ + The collection of column definitions for this content type. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ColumnDefinitionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ColumnDefinitionItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ColumnDefinitionItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/item/source_column/source_column_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/item/source_column/source_column_request_builder.py new file mode 100644 index 00000000000..6bd3613d635 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/columns/item/source_column/source_column_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.column_definition import ColumnDefinition + from ............models.o_data_errors.o_data_error import ODataError + +class SourceColumnRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the sourceColumn property of the microsoft.graph.columnDefinition entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SourceColumnRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/columns/{columnDefinition%2Did}/sourceColumn{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[SourceColumnRequestBuilderGetQueryParameters]] = None) -> Optional[ColumnDefinition]: + """ + The source column for the content type column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ColumnDefinition] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.column_definition import ColumnDefinition + + return await self.request_adapter.send_async(request_info, ColumnDefinition, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SourceColumnRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The source column for the content type column. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> SourceColumnRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SourceColumnRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SourceColumnRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SourceColumnRequestBuilderGetQueryParameters(): + """ + The source column for the content type column. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class SourceColumnRequestBuilderGetRequestConfiguration(RequestConfiguration[SourceColumnRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/content_type_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/content_type_item_request_builder.py new file mode 100644 index 00000000000..7ac017a75d4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/content_type_item_request_builder.py @@ -0,0 +1,287 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.content_type import ContentType + from .........models.o_data_errors.o_data_error import ODataError + from .associate_with_hub_sites.associate_with_hub_sites_request_builder import AssociateWithHubSitesRequestBuilder + from .base.base_request_builder_ import BaseRequestBuilder_ + from .base_types.base_types_request_builder import BaseTypesRequestBuilder + from .columns.columns_request_builder import ColumnsRequestBuilder + from .column_links.column_links_request_builder import ColumnLinksRequestBuilder + from .column_positions.column_positions_request_builder import ColumnPositionsRequestBuilder + from .copy_to_default_content_location.copy_to_default_content_location_request_builder import CopyToDefaultContentLocationRequestBuilder + from .is_published.is_published_request_builder import IsPublishedRequestBuilder + from .publish.publish_request_builder import PublishRequestBuilder + from .unpublish.unpublish_request_builder import UnpublishRequestBuilder + +class ContentTypeItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the contentTypes property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentTypeItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property contentTypes for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentTypeItemRequestBuilderGetQueryParameters]] = None) -> Optional[ContentType]: + """ + The collection of content types present in this list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentType] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.content_type import ContentType + + return await self.request_adapter.send_async(request_info, ContentType, error_mapping) + + async def patch(self,body: ContentType, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ContentType]: + """ + Update the navigation property contentTypes in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ContentType] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.content_type import ContentType + + return await self.request_adapter.send_async(request_info, ContentType, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property contentTypes for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentTypeItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of content types present in this list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ContentType, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property contentTypes in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ContentTypeItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentTypeItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentTypeItemRequestBuilder(self.request_adapter, raw_url) + + @property + def associate_with_hub_sites(self) -> AssociateWithHubSitesRequestBuilder: + """ + Provides operations to call the associateWithHubSites method. + """ + from .associate_with_hub_sites.associate_with_hub_sites_request_builder import AssociateWithHubSitesRequestBuilder + + return AssociateWithHubSitesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def base(self) -> BaseRequestBuilder_: + """ + Provides operations to manage the base property of the microsoft.graph.contentType entity. + """ + from .base.base_request_builder_ import BaseRequestBuilder_ + + return BaseRequestBuilder_(self.request_adapter, self.path_parameters) + + @property + def base_types(self) -> BaseTypesRequestBuilder: + """ + Provides operations to manage the baseTypes property of the microsoft.graph.contentType entity. + """ + from .base_types.base_types_request_builder import BaseTypesRequestBuilder + + return BaseTypesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def column_links(self) -> ColumnLinksRequestBuilder: + """ + Provides operations to manage the columnLinks property of the microsoft.graph.contentType entity. + """ + from .column_links.column_links_request_builder import ColumnLinksRequestBuilder + + return ColumnLinksRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def column_positions(self) -> ColumnPositionsRequestBuilder: + """ + Provides operations to manage the columnPositions property of the microsoft.graph.contentType entity. + """ + from .column_positions.column_positions_request_builder import ColumnPositionsRequestBuilder + + return ColumnPositionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.contentType entity. + """ + from .columns.columns_request_builder import ColumnsRequestBuilder + + return ColumnsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def copy_to_default_content_location(self) -> CopyToDefaultContentLocationRequestBuilder: + """ + Provides operations to call the copyToDefaultContentLocation method. + """ + from .copy_to_default_content_location.copy_to_default_content_location_request_builder import CopyToDefaultContentLocationRequestBuilder + + return CopyToDefaultContentLocationRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def is_published(self) -> IsPublishedRequestBuilder: + """ + Provides operations to call the isPublished method. + """ + from .is_published.is_published_request_builder import IsPublishedRequestBuilder + + return IsPublishedRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def publish(self) -> PublishRequestBuilder: + """ + Provides operations to call the publish method. + """ + from .publish.publish_request_builder import PublishRequestBuilder + + return PublishRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def unpublish(self) -> UnpublishRequestBuilder: + """ + Provides operations to call the unpublish method. + """ + from .unpublish.unpublish_request_builder import UnpublishRequestBuilder + + return UnpublishRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ContentTypeItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentTypeItemRequestBuilderGetQueryParameters(): + """ + The collection of content types present in this list. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ContentTypeItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentTypeItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentTypeItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_post_request_body.py new file mode 100644 index 00000000000..55ba7434ef5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.item_reference import ItemReference + +@dataclass +class CopyToDefaultContentLocationPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The destinationFileName property + destination_file_name: Optional[str] = None + # The sourceFile property + source_file: Optional[ItemReference] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CopyToDefaultContentLocationPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CopyToDefaultContentLocationPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CopyToDefaultContentLocationPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.item_reference import ItemReference + + from ..........models.item_reference import ItemReference + + fields: Dict[str, Callable[[Any], None]] = { + "destinationFileName": lambda n : setattr(self, 'destination_file_name', n.get_str_value()), + "sourceFile": lambda n : setattr(self, 'source_file', n.get_object_value(ItemReference)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_str_value("destinationFileName", self.destination_file_name) + writer.write_object_value("sourceFile", self.source_file) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py new file mode 100644 index 00000000000..32ab301c726 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/copy_to_default_content_location/copy_to_default_content_location_request_builder.py @@ -0,0 +1,86 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from .copy_to_default_content_location_post_request_body import CopyToDefaultContentLocationPostRequestBody + +class CopyToDefaultContentLocationRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the copyToDefaultContentLocation method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CopyToDefaultContentLocationRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/copyToDefaultContentLocation", path_parameters) + + async def post(self,body: CopyToDefaultContentLocationPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Copy a file to a default content location in a content type. The file can then be added as a default file or template via a POST operation. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/contenttype-copytodefaultcontentlocation?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,body: CopyToDefaultContentLocationPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Copy a file to a default content location in a content type. The file can then be added as a default file or template via a POST operation. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CopyToDefaultContentLocationRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CopyToDefaultContentLocationRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CopyToDefaultContentLocationRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CopyToDefaultContentLocationRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/is_published/is_published_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/is_published/is_published_get_response.py new file mode 100644 index 00000000000..41d6b0bed1e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/is_published/is_published_get_response.py @@ -0,0 +1,49 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +@dataclass +class IsPublishedGetResponse(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The value property + value: Optional[bool] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> IsPublishedGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: IsPublishedGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return IsPublishedGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_bool_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_bool_value("value", self.value) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/is_published/is_published_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/is_published/is_published_request_builder.py new file mode 100644 index 00000000000..daf8c75f788 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/is_published/is_published_request_builder.py @@ -0,0 +1,81 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from .is_published_get_response import IsPublishedGetResponse + +class IsPublishedRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the isPublished method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new IsPublishedRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/isPublished()", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[IsPublishedGetResponse]: + """ + Check the publishing status of a contentType in a content type hub site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[IsPublishedGetResponse] + Find more info here: https://learn.microsoft.com/graph/api/contenttype-ispublished?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .is_published_get_response import IsPublishedGetResponse + + return await self.request_adapter.send_async(request_info, IsPublishedGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Check the publishing status of a contentType in a content type hub site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> IsPublishedRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: IsPublishedRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return IsPublishedRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class IsPublishedRequestBuilderGetRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/publish/publish_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/publish/publish_request_builder.py new file mode 100644 index 00000000000..6a9a17c3257 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/publish/publish_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class PublishRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the publish method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PublishRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/publish", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Publishes a contentType present in the content type hub site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/contenttype-publish?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Publishes a contentType present in the content type hub site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> PublishRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PublishRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PublishRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class PublishRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/unpublish/unpublish_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/unpublish/unpublish_request_builder.py new file mode 100644 index 00000000000..df14220aead --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/content_types/item/unpublish/unpublish_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class UnpublishRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the unpublish method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new UnpublishRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/contentTypes/{contentType%2Did}/unpublish", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Unpublish a contentType from a content type hub site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/contenttype-unpublish?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Unpublish a contentType from a content type hub site. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> UnpublishRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: UnpublishRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return UnpublishRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class UnpublishRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/created_by_user_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/created_by_user_request_builder.py new file mode 100644 index 00000000000..4aca9538dbf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/created_by_user_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.user import User + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class CreatedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CreatedByUserRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/createdByUser{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]] = None) -> Optional[User]: + """ + Identity of the user who created the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[User] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.user import User + + return await self.request_adapter.send_async(request_info, User, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Identity of the user who created the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CreatedByUserRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CreatedByUserRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CreatedByUserRequestBuilder(self.request_adapter, raw_url) + + @property + def mailbox_settings(self) -> MailboxSettingsRequestBuilder: + """ + The mailboxSettings property + """ + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + + return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CreatedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who created the item. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class CreatedByUserRequestBuilderGetRequestConfiguration(RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py new file mode 100644 index 00000000000..6664f5888ab --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -0,0 +1,151 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.mailbox_settings import MailboxSettings + from .........models.o_data_errors.o_data_error import ODataError + +class MailboxSettingsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/list/createdByUser/mailboxSettings + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/createdByUser/mailboxSettings{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + async def patch(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MailboxSettingsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MailboxSettingsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MailboxSettingsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MailboxSettingsRequestBuilderGetQueryParameters(): + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MailboxSettingsRequestBuilderGetRequestConfiguration(RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MailboxSettingsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..d8677088420 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/createdByUser/serviceProvisioningErrors/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..233c755ee0f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,146 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/list/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/createdByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/drive/drive_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/drive/drive_request_builder.py new file mode 100644 index 00000000000..c45e7715ebd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/drive/drive_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.drive import Drive + from ........models.o_data_errors.o_data_error import ODataError + +class DriveRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the drive property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DriveRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/drive{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DriveRequestBuilderGetQueryParameters]] = None) -> Optional[Drive]: + """ + Allows access to the list as a drive resource with driveItems. Only present on document libraries. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Drive] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.drive import Drive + + return await self.request_adapter.send_async(request_info, Drive, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DriveRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Allows access to the list as a drive resource with driveItems. Only present on document libraries. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DriveRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DriveRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DriveRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DriveRequestBuilderGetQueryParameters(): + """ + Allows access to the list as a drive resource with driveItems. Only present on document libraries. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DriveRequestBuilderGetRequestConfiguration(RequestConfiguration[DriveRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta/delta_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta/delta_get_response.py new file mode 100644 index 00000000000..ef80d282a50 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta/delta_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.list_item import ListItem + +from .........models.base_delta_function_response import BaseDeltaFunctionResponse + +@dataclass +class DeltaGetResponse(BaseDeltaFunctionResponse): + # The value property + value: Optional[List[ListItem]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DeltaGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DeltaGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DeltaGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.list_item import ListItem + + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.list_item import ListItem + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ListItem)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta/delta_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta/delta_request_builder.py new file mode 100644 index 00000000000..b1290a7a5c5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta/delta_request_builder.py @@ -0,0 +1,137 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .delta_get_response import DeltaGetResponse + +class DeltaRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the delta method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DeltaRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/delta(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DeltaRequestBuilderGetQueryParameters]] = None) -> Optional[DeltaGetResponse]: + """ + Get newly created, updated, or deleted list items without having to perform a full read of the entire items collection. Your app begins by calling delta without any parameters.The service starts enumerating the hierarchy of the list, returning pages of items, and either an @odata.nextLink or an @odata.deltaLink.Your app should continue calling with the @odata.nextLink until you see an @odata.deltaLink returned. After you received all the changes, you can apply them to your local state.To check for changes in the future, call delta again with the @odata.deltaLink from the previous response. The delta feed shows the latest state for each item, not each change. If an item was renamed twice, it only shows up once, with its latest name.The same item might appear more than once in a delta feed, for various reasons. You should use the last occurrence you see. Items with this property should be removed from your local state. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DeltaGetResponse] + Find more info here: https://learn.microsoft.com/graph/api/listitem-delta?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .delta_get_response import DeltaGetResponse + + return await self.request_adapter.send_async(request_info, DeltaGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeltaRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get newly created, updated, or deleted list items without having to perform a full read of the entire items collection. Your app begins by calling delta without any parameters.The service starts enumerating the hierarchy of the list, returning pages of items, and either an @odata.nextLink or an @odata.deltaLink.Your app should continue calling with the @odata.nextLink until you see an @odata.deltaLink returned. After you received all the changes, you can apply them to your local state.To check for changes in the future, call delta again with the @odata.deltaLink from the previous response. The delta feed shows the latest state for each item, not each change. If an item was renamed twice, it only shows up once, with its latest name.The same item might appear more than once in a delta feed, for various reasons. You should use the last occurrence you see. Items with this property should be removed from your local state. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DeltaRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DeltaRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DeltaRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DeltaRequestBuilderGetQueryParameters(): + """ + Get newly created, updated, or deleted list items without having to perform a full read of the entire items collection. Your app begins by calling delta without any parameters.The service starts enumerating the hierarchy of the list, returning pages of items, and either an @odata.nextLink or an @odata.deltaLink.Your app should continue calling with the @odata.nextLink until you see an @odata.deltaLink returned. After you received all the changes, you can apply them to your local state.To check for changes in the future, call delta again with the @odata.deltaLink from the previous response. The delta feed shows the latest state for each item, not each change. If an item was renamed twice, it only shows up once, with its latest name.The same item might appear more than once in a delta feed, for various reasons. You should use the last occurrence you see. Items with this property should be removed from your local state. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class DeltaRequestBuilderGetRequestConfiguration(RequestConfiguration[DeltaRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta_with_token/delta_with_token_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta_with_token/delta_with_token_get_response.py new file mode 100644 index 00000000000..d1a2e7651fa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta_with_token/delta_with_token_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.list_item import ListItem + +from .........models.base_delta_function_response import BaseDeltaFunctionResponse + +@dataclass +class DeltaWithTokenGetResponse(BaseDeltaFunctionResponse): + # The value property + value: Optional[List[ListItem]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> DeltaWithTokenGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: DeltaWithTokenGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return DeltaWithTokenGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.list_item import ListItem + + from .........models.base_delta_function_response import BaseDeltaFunctionResponse + from .........models.list_item import ListItem + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ListItem)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta_with_token/delta_with_token_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta_with_token/delta_with_token_request_builder.py new file mode 100644 index 00000000000..90663e36bda --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/delta_with_token/delta_with_token_request_builder.py @@ -0,0 +1,139 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .delta_with_token_get_response import DeltaWithTokenGetResponse + +class DeltaWithTokenRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the delta method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], token: Optional[str] = None) -> None: + """ + Instantiates a new DeltaWithTokenRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param token: Usage: token='{token}' + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['token'] = str(token) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/delta(token='{token}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DeltaWithTokenRequestBuilderGetQueryParameters]] = None) -> Optional[DeltaWithTokenGetResponse]: + """ + Invoke function delta + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DeltaWithTokenGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .delta_with_token_get_response import DeltaWithTokenGetResponse + + return await self.request_adapter.send_async(request_info, DeltaWithTokenGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DeltaWithTokenRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Invoke function delta + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DeltaWithTokenRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DeltaWithTokenRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DeltaWithTokenRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class DeltaWithTokenRequestBuilderGetQueryParameters(): + """ + Invoke function delta + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class DeltaWithTokenRequestBuilderGetRequestConfiguration(RequestConfiguration[DeltaWithTokenRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/analytics/analytics_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/analytics/analytics_request_builder.py new file mode 100644 index 00000000000..eb5a0f2cb34 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/analytics/analytics_request_builder.py @@ -0,0 +1,106 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.item_analytics import ItemAnalytics + from ..........models.o_data_errors.o_data_error import ODataError + +class AnalyticsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the analytics property of the microsoft.graph.listItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new AnalyticsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/analytics{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[AnalyticsRequestBuilderGetQueryParameters]] = None) -> Optional[ItemAnalytics]: + """ + Analytics about the view activities that took place on this item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ItemAnalytics] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.item_analytics import ItemAnalytics + + return await self.request_adapter.send_async(request_info, ItemAnalytics, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[AnalyticsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Analytics about the view activities that took place on this item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> AnalyticsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: AnalyticsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return AnalyticsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class AnalyticsRequestBuilderGetQueryParameters(): + """ + Analytics about the view activities that took place on this item. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class AnalyticsRequestBuilderGetRequestConfiguration(RequestConfiguration[AnalyticsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/create_link/create_link_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/create_link/create_link_post_request_body.py new file mode 100644 index 00000000000..54b5e4c6c45 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/create_link/create_link_post_request_body.py @@ -0,0 +1,85 @@ +from __future__ import annotations +import datetime +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.drive_recipient import DriveRecipient + +@dataclass +class CreateLinkPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The expirationDateTime property + expiration_date_time: Optional[datetime.datetime] = None + # The message property + message: Optional[str] = None + # The password property + password: Optional[str] = None + # The recipients property + recipients: Optional[List[DriveRecipient]] = None + # The retainInheritedPermissions property + retain_inherited_permissions: Optional[bool] = None + # The scope property + scope: Optional[str] = None + # The sendNotification property + send_notification: Optional[bool] = None + # The type property + type: Optional[str] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> CreateLinkPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: CreateLinkPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return CreateLinkPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.drive_recipient import DriveRecipient + + from ..........models.drive_recipient import DriveRecipient + + fields: Dict[str, Callable[[Any], None]] = { + "expirationDateTime": lambda n : setattr(self, 'expiration_date_time', n.get_datetime_value()), + "message": lambda n : setattr(self, 'message', n.get_str_value()), + "password": lambda n : setattr(self, 'password', n.get_str_value()), + "recipients": lambda n : setattr(self, 'recipients', n.get_collection_of_object_values(DriveRecipient)), + "retainInheritedPermissions": lambda n : setattr(self, 'retain_inherited_permissions', n.get_bool_value()), + "scope": lambda n : setattr(self, 'scope', n.get_str_value()), + "sendNotification": lambda n : setattr(self, 'send_notification', n.get_bool_value()), + "type": lambda n : setattr(self, 'type', n.get_str_value()), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_datetime_value("expirationDateTime", self.expiration_date_time) + writer.write_str_value("message", self.message) + writer.write_str_value("password", self.password) + writer.write_collection_of_object_values("recipients", self.recipients) + writer.write_bool_value("retainInheritedPermissions", self.retain_inherited_permissions) + writer.write_str_value("scope", self.scope) + writer.write_bool_value("sendNotification", self.send_notification) + writer.write_str_value("type", self.type) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/create_link/create_link_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/create_link/create_link_request_builder.py new file mode 100644 index 00000000000..57c815ffd48 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/create_link/create_link_request_builder.py @@ -0,0 +1,88 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.permission import Permission + from .create_link_post_request_body import CreateLinkPostRequestBody + +class CreateLinkRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the createLink method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CreateLinkRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/createLink", path_parameters) + + async def post(self,body: CreateLinkPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Permission]: + """ + Invoke action createLink + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Permission] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.permission import Permission + + return await self.request_adapter.send_async(request_info, Permission, error_mapping) + + def to_post_request_information(self,body: CreateLinkPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Invoke action createLink + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> CreateLinkRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CreateLinkRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CreateLinkRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CreateLinkRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/created_by_user_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/created_by_user_request_builder.py new file mode 100644 index 00000000000..51384cf0608 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/created_by_user_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.user import User + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class CreatedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CreatedByUserRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/createdByUser{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]] = None) -> Optional[User]: + """ + Identity of the user who created the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[User] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.user import User + + return await self.request_adapter.send_async(request_info, User, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Identity of the user who created the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> CreatedByUserRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CreatedByUserRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CreatedByUserRequestBuilder(self.request_adapter, raw_url) + + @property + def mailbox_settings(self) -> MailboxSettingsRequestBuilder: + """ + The mailboxSettings property + """ + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + + return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class CreatedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who created the item. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class CreatedByUserRequestBuilderGetRequestConfiguration(RequestConfiguration[CreatedByUserRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py new file mode 100644 index 00000000000..77e407cc7ee --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -0,0 +1,151 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.mailbox_settings import MailboxSettings + from ...........models.o_data_errors.o_data_error import ODataError + +class MailboxSettingsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/list/items/{listItem-id}/createdByUser/mailboxSettings + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/createdByUser/mailboxSettings{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + async def patch(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MailboxSettingsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MailboxSettingsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MailboxSettingsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MailboxSettingsRequestBuilderGetQueryParameters(): + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MailboxSettingsRequestBuilderGetRequestConfiguration(RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MailboxSettingsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..a11218dddf5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..f8095e6f2e6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/created_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,146 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/list/items/{listItem-id}/createdByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/createdByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/count/count_request_builder.py new file mode 100644 index 00000000000..0dcdcb19aca --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/documentSetVersions/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/document_set_versions_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/document_set_versions_request_builder.py new file mode 100644 index 00000000000..4758d05d65e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/document_set_versions_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.document_set_version import DocumentSetVersion + from ..........models.document_set_version_collection_response import DocumentSetVersionCollectionResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.document_set_version_item_request_builder import DocumentSetVersionItemRequestBuilder + +class DocumentSetVersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DocumentSetVersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/documentSetVersions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_document_set_version_id(self,document_set_version_id: str) -> DocumentSetVersionItemRequestBuilder: + """ + Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. + param document_set_version_id: The unique identifier of documentSetVersion + Returns: DocumentSetVersionItemRequestBuilder + """ + if not document_set_version_id: + raise TypeError("document_set_version_id cannot be null.") + from .item.document_set_version_item_request_builder import DocumentSetVersionItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["documentSetVersion%2Did"] = document_set_version_id + return DocumentSetVersionItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[DocumentSetVersionsRequestBuilderGetQueryParameters]] = None) -> Optional[DocumentSetVersionCollectionResponse]: + """ + Version information for a document set version created by a user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DocumentSetVersionCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.document_set_version_collection_response import DocumentSetVersionCollectionResponse + + return await self.request_adapter.send_async(request_info, DocumentSetVersionCollectionResponse, error_mapping) + + async def post(self,body: DocumentSetVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DocumentSetVersion]: + """ + Create new navigation property to documentSetVersions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DocumentSetVersion] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.document_set_version import DocumentSetVersion + + return await self.request_adapter.send_async(request_info, DocumentSetVersion, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DocumentSetVersionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Version information for a document set version created by a user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: DocumentSetVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to documentSetVersions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DocumentSetVersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DocumentSetVersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DocumentSetVersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DocumentSetVersionsRequestBuilderGetQueryParameters(): + """ + Version information for a document set version created by a user. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class DocumentSetVersionsRequestBuilderGetRequestConfiguration(RequestConfiguration[DocumentSetVersionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DocumentSetVersionsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py new file mode 100644 index 00000000000..461976de83e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/document_set_version_item_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.document_set_version import DocumentSetVersion + from ...........models.o_data_errors.o_data_error import ODataError + from .fields.fields_request_builder import FieldsRequestBuilder + from .restore.restore_request_builder import RestoreRequestBuilder + +class DocumentSetVersionItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DocumentSetVersionItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property documentSetVersions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[DocumentSetVersionItemRequestBuilderGetQueryParameters]] = None) -> Optional[DocumentSetVersion]: + """ + Version information for a document set version created by a user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DocumentSetVersion] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.document_set_version import DocumentSetVersion + + return await self.request_adapter.send_async(request_info, DocumentSetVersion, error_mapping) + + async def patch(self,body: DocumentSetVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DocumentSetVersion]: + """ + Update the navigation property documentSetVersions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DocumentSetVersion] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.document_set_version import DocumentSetVersion + + return await self.request_adapter.send_async(request_info, DocumentSetVersion, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property documentSetVersions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DocumentSetVersionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Version information for a document set version created by a user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: DocumentSetVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property documentSetVersions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> DocumentSetVersionItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DocumentSetVersionItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DocumentSetVersionItemRequestBuilder(self.request_adapter, raw_url) + + @property + def fields(self) -> FieldsRequestBuilder: + """ + Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + """ + from .fields.fields_request_builder import FieldsRequestBuilder + + return FieldsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def restore(self) -> RestoreRequestBuilder: + """ + Provides operations to call the restore method. + """ + from .restore.restore_request_builder import RestoreRequestBuilder + + return RestoreRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DocumentSetVersionItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DocumentSetVersionItemRequestBuilderGetQueryParameters(): + """ + Version information for a document set version created by a user. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DocumentSetVersionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[DocumentSetVersionItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class DocumentSetVersionItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/fields/fields_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/fields/fields_request_builder.py new file mode 100644 index 00000000000..8cb156a5c2b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/fields/fields_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.field_value_set import FieldValueSet + from ............models.o_data_errors.o_data_error import ODataError + +class FieldsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FieldsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}/fields{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property fields for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FieldsRequestBuilderGetQueryParameters]] = None) -> Optional[FieldValueSet]: + """ + A collection of the fields and values for this version of the list item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FieldValueSet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.field_value_set import FieldValueSet + + return await self.request_adapter.send_async(request_info, FieldValueSet, error_mapping) + + async def patch(self,body: FieldValueSet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[FieldValueSet]: + """ + Update the navigation property fields in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FieldValueSet] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.field_value_set import FieldValueSet + + return await self.request_adapter.send_async(request_info, FieldValueSet, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property fields for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FieldsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + A collection of the fields and values for this version of the list item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: FieldValueSet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property fields in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FieldsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FieldsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FieldsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FieldsRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FieldsRequestBuilderGetQueryParameters(): + """ + A collection of the fields and values for this version of the list item. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FieldsRequestBuilderGetRequestConfiguration(RequestConfiguration[FieldsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FieldsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/restore/restore_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/restore/restore_request_builder.py new file mode 100644 index 00000000000..db26150786f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/document_set_versions/item/restore/restore_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + +class RestoreRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the restore method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RestoreRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/documentSetVersions/{documentSetVersion%2Did}/restore", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Restore a document set version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/documentsetversion-restore?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Restore a document set version. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RestoreRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RestoreRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RestoreRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RestoreRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/drive_item/content/content_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/drive_item/content/content_request_builder.py new file mode 100644 index 00000000000..89d039d07cd --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/drive_item/content/content_request_builder.py @@ -0,0 +1,180 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.drive_item import DriveItem + from ...........models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the storage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/driveItem/content{?%24format*}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> bytes: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/octet-stream, application/json") + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body, "application/octet-stream") + return request_info + + def with_url(self,raw_url: str) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ContentRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderGetQueryParameters(): + """ + The content stream, if the item represents a file. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "format": + return "%24format" + return original_name + + # Format of the content + format: Optional[str] = None + + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/drive_item/drive_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/drive_item/drive_item_request_builder.py new file mode 100644 index 00000000000..cea82992282 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/drive_item/drive_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.drive_item import DriveItem + from ..........models.o_data_errors.o_data_error import ODataError + from .content.content_request_builder import ContentRequestBuilder + +class DriveItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the driveItem property of the microsoft.graph.listItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DriveItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/driveItem{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DriveItemRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItem]: + """ + For document libraries, the driveItem relationship exposes the listItem as a driveItem + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DriveItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + For document libraries, the driveItem relationship exposes the listItem as a driveItem + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DriveItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DriveItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DriveItemRequestBuilder(self.request_adapter, raw_url) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the storage entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DriveItemRequestBuilderGetQueryParameters(): + """ + For document libraries, the driveItem relationship exposes the listItem as a driveItem + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DriveItemRequestBuilderGetRequestConfiguration(RequestConfiguration[DriveItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/fields/fields_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/fields/fields_request_builder.py new file mode 100644 index 00000000000..815d9d35dd4 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/fields/fields_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.field_value_set import FieldValueSet + from ..........models.o_data_errors.o_data_error import ODataError + +class FieldsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the fields property of the microsoft.graph.listItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FieldsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/fields{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property fields for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FieldsRequestBuilderGetQueryParameters]] = None) -> Optional[FieldValueSet]: + """ + The values of the columns set on this list item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FieldValueSet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.field_value_set import FieldValueSet + + return await self.request_adapter.send_async(request_info, FieldValueSet, error_mapping) + + async def patch(self,body: FieldValueSet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[FieldValueSet]: + """ + Update the navigation property fields in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FieldValueSet] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.field_value_set import FieldValueSet + + return await self.request_adapter.send_async(request_info, FieldValueSet, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property fields for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FieldsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The values of the columns set on this list item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: FieldValueSet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property fields in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FieldsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FieldsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FieldsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FieldsRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FieldsRequestBuilderGetQueryParameters(): + """ + The values of the columns set on this list item. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FieldsRequestBuilderGetRequestConfiguration(RequestConfiguration[FieldsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FieldsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py new file mode 100644 index 00000000000..0db57143a6b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval/get_activities_by_interval_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ..........models.item_activity_stat import ItemActivityStat + +from ..........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetActivitiesByIntervalGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ItemActivityStat]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GetActivitiesByIntervalGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetActivitiesByIntervalGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetActivitiesByIntervalGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ..........models.item_activity_stat import ItemActivityStat + + from ..........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ..........models.item_activity_stat import ItemActivityStat + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ItemActivityStat)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py new file mode 100644 index 00000000000..b6b69a58c80 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval/get_activities_by_interval_request_builder.py @@ -0,0 +1,136 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse + +class GetActivitiesByIntervalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the getActivitiesByInterval method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GetActivitiesByIntervalRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/getActivitiesByInterval(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[GetActivitiesByIntervalRequestBuilderGetQueryParameters]] = None) -> Optional[GetActivitiesByIntervalGetResponse]: + """ + Invoke function getActivitiesByInterval + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[GetActivitiesByIntervalGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .get_activities_by_interval_get_response import GetActivitiesByIntervalGetResponse + + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GetActivitiesByIntervalRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Invoke function getActivitiesByInterval + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> GetActivitiesByIntervalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GetActivitiesByIntervalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GetActivitiesByIntervalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GetActivitiesByIntervalRequestBuilderGetQueryParameters(): + """ + Invoke function getActivitiesByInterval + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class GetActivitiesByIntervalRequestBuilderGetRequestConfiguration(RequestConfiguration[GetActivitiesByIntervalRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py new file mode 100644 index 00000000000..a16312e4a42 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ..........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ..........models.item_activity_stat import ItemActivityStat + +from ..........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[ItemActivityStat]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ..........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ..........models.item_activity_stat import ItemActivityStat + + from ..........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ..........models.item_activity_stat import ItemActivityStat + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(ItemActivityStat)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py new file mode 100644 index 00000000000..bc0015890f9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval/get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder.py @@ -0,0 +1,143 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse + +class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the getActivitiesByInterval method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], end_date_time: Optional[str] = None, interval: Optional[str] = None, start_date_time: Optional[str] = None) -> None: + """ + Instantiates a new GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder and sets the default values. + param end_date_time: Usage: endDateTime='{endDateTime}' + param interval: Usage: interval='{interval}' + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + param start_date_time: Usage: startDateTime='{startDateTime}' + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['endDateTime'] = str(end_date_time) + path_parameters['interval'] = str(interval) + path_parameters['startDateTime'] = str(start_date_time) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/getActivitiesByInterval(startDateTime='{startDateTime}',endDateTime='{endDateTime}',interval='{interval}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters]] = None) -> Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse]: + """ + Invoke function getActivitiesByInterval + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_get_response import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse + + return await self.request_adapter.send_async(request_info, GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Invoke function getActivitiesByInterval + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters(): + """ + Invoke function getActivitiesByInterval + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetRequestConfiguration(RequestConfiguration[GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py new file mode 100644 index 00000000000..a3f112e5241 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/last_modified_by_user_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + from ..........models.user import User + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class LastModifiedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/lastModifiedByUser{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]] = None) -> Optional[User]: + """ + Identity of the user who last modified the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[User] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.user import User + + return await self.request_adapter.send_async(request_info, User, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Identity of the user who last modified the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> LastModifiedByUserRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LastModifiedByUserRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LastModifiedByUserRequestBuilder(self.request_adapter, raw_url) + + @property + def mailbox_settings(self) -> MailboxSettingsRequestBuilder: + """ + The mailboxSettings property + """ + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + + return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LastModifiedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who last modified the item. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LastModifiedByUserRequestBuilderGetRequestConfiguration(RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py new file mode 100644 index 00000000000..dc1dd6d6d69 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -0,0 +1,151 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.mailbox_settings import MailboxSettings + from ...........models.o_data_errors.o_data_error import ODataError + +class MailboxSettingsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/list/items/{listItem-id}/lastModifiedByUser/mailboxSettings + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/lastModifiedByUser/mailboxSettings{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + async def patch(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MailboxSettingsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MailboxSettingsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MailboxSettingsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MailboxSettingsRequestBuilderGetQueryParameters(): + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MailboxSettingsRequestBuilderGetRequestConfiguration(RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MailboxSettingsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..9ccb14085a1 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..00003b2438a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,146 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/list/items/{listItem-id}/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/lastModifiedByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/list_item_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/list_item_item_request_builder.py new file mode 100644 index 00000000000..48782447be0 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/list_item_item_request_builder.py @@ -0,0 +1,296 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.list_item import ListItem + from .........models.o_data_errors.o_data_error import ODataError + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + from .created_by_user.created_by_user_request_builder import CreatedByUserRequestBuilder + from .create_link.create_link_request_builder import CreateLinkRequestBuilder + from .document_set_versions.document_set_versions_request_builder import DocumentSetVersionsRequestBuilder + from .drive_item.drive_item_request_builder import DriveItemRequestBuilder + from .fields.fields_request_builder import FieldsRequestBuilder + from .get_activities_by_interval.get_activities_by_interval_request_builder import GetActivitiesByIntervalRequestBuilder + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval.get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + from .versions.versions_request_builder import VersionsRequestBuilder + +class ListItemItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the items property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ListItemItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property items for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ListItemItemRequestBuilderGetQueryParameters]] = None) -> Optional[ListItem]: + """ + All items contained in the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.list_item import ListItem + + return await self.request_adapter.send_async(request_info, ListItem, error_mapping) + + def get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval(self,end_date_time: str, interval: str, start_date_time: str) -> GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder: + """ + Provides operations to call the getActivitiesByInterval method. + param end_date_time: Usage: endDateTime='{endDateTime}' + param interval: Usage: interval='{interval}' + param start_date_time: Usage: startDateTime='{startDateTime}' + Returns: GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder + """ + if not end_date_time: + raise TypeError("end_date_time cannot be null.") + if not interval: + raise TypeError("interval cannot be null.") + if not start_date_time: + raise TypeError("start_date_time cannot be null.") + from .get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval.get_activities_by_interval_with_start_date_time_with_end_date_time_with_interval_request_builder import GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder + + return GetActivitiesByIntervalWithStartDateTimeWithEndDateTimeWithIntervalRequestBuilder(self.request_adapter, self.path_parameters, end_date_time, interval, start_date_time) + + async def patch(self,body: ListItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ListItem]: + """ + Update the navigation property items in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.list_item import ListItem + + return await self.request_adapter.send_async(request_info, ListItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property items for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ListItemItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + All items contained in the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ListItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property items in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ListItemItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ListItemItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ListItemItemRequestBuilder(self.request_adapter, raw_url) + + @property + def analytics(self) -> AnalyticsRequestBuilder: + """ + Provides operations to manage the analytics property of the microsoft.graph.listItem entity. + """ + from .analytics.analytics_request_builder import AnalyticsRequestBuilder + + return AnalyticsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def create_link(self) -> CreateLinkRequestBuilder: + """ + Provides operations to call the createLink method. + """ + from .create_link.create_link_request_builder import CreateLinkRequestBuilder + + return CreateLinkRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def created_by_user(self) -> CreatedByUserRequestBuilder: + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + from .created_by_user.created_by_user_request_builder import CreatedByUserRequestBuilder + + return CreatedByUserRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def document_set_versions(self) -> DocumentSetVersionsRequestBuilder: + """ + Provides operations to manage the documentSetVersions property of the microsoft.graph.listItem entity. + """ + from .document_set_versions.document_set_versions_request_builder import DocumentSetVersionsRequestBuilder + + return DocumentSetVersionsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def drive_item(self) -> DriveItemRequestBuilder: + """ + Provides operations to manage the driveItem property of the microsoft.graph.listItem entity. + """ + from .drive_item.drive_item_request_builder import DriveItemRequestBuilder + + return DriveItemRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def fields(self) -> FieldsRequestBuilder: + """ + Provides operations to manage the fields property of the microsoft.graph.listItem entity. + """ + from .fields.fields_request_builder import FieldsRequestBuilder + + return FieldsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def get_activities_by_interval(self) -> GetActivitiesByIntervalRequestBuilder: + """ + Provides operations to call the getActivitiesByInterval method. + """ + from .get_activities_by_interval.get_activities_by_interval_request_builder import GetActivitiesByIntervalRequestBuilder + + return GetActivitiesByIntervalRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def last_modified_by_user(self) -> LastModifiedByUserRequestBuilder: + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + + return LastModifiedByUserRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def versions(self) -> VersionsRequestBuilder: + """ + Provides operations to manage the versions property of the microsoft.graph.listItem entity. + """ + from .versions.versions_request_builder import VersionsRequestBuilder + + return VersionsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ListItemItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ListItemItemRequestBuilderGetQueryParameters(): + """ + All items contained in the list. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ListItemItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ListItemItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ListItemItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/count/count_request_builder.py new file mode 100644 index 00000000000..0a22b8d86d9 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/versions/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/fields/fields_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/fields/fields_request_builder.py new file mode 100644 index 00000000000..98d30e5697e --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/fields/fields_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.field_value_set import FieldValueSet + from ............models.o_data_errors.o_data_error import ODataError + +class FieldsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FieldsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/versions/{listItemVersion%2Did}/fields{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property fields for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FieldsRequestBuilderGetQueryParameters]] = None) -> Optional[FieldValueSet]: + """ + A collection of the fields and values for this version of the list item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FieldValueSet] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.field_value_set import FieldValueSet + + return await self.request_adapter.send_async(request_info, FieldValueSet, error_mapping) + + async def patch(self,body: FieldValueSet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[FieldValueSet]: + """ + Update the navigation property fields in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FieldValueSet] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ............models.field_value_set import FieldValueSet + + return await self.request_adapter.send_async(request_info, FieldValueSet, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property fields for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FieldsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + A collection of the fields and values for this version of the list item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: FieldValueSet, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property fields in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FieldsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FieldsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FieldsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class FieldsRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FieldsRequestBuilderGetQueryParameters(): + """ + A collection of the fields and values for this version of the list item. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FieldsRequestBuilderGetRequestConfiguration(RequestConfiguration[FieldsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FieldsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/list_item_version_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/list_item_version_item_request_builder.py new file mode 100644 index 00000000000..7e943121b1d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/list_item_version_item_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...........models.list_item_version import ListItemVersion + from ...........models.o_data_errors.o_data_error import ODataError + from .fields.fields_request_builder import FieldsRequestBuilder + from .restore_version.restore_version_request_builder import RestoreVersionRequestBuilder + +class ListItemVersionItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the versions property of the microsoft.graph.listItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ListItemVersionItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/versions/{listItemVersion%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property versions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ListItemVersionItemRequestBuilderGetQueryParameters]] = None) -> Optional[ListItemVersion]: + """ + The list of previous versions of the list item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListItemVersion] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.list_item_version import ListItemVersion + + return await self.request_adapter.send_async(request_info, ListItemVersion, error_mapping) + + async def patch(self,body: ListItemVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ListItemVersion]: + """ + Update the navigation property versions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListItemVersion] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...........models.list_item_version import ListItemVersion + + return await self.request_adapter.send_async(request_info, ListItemVersion, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property versions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ListItemVersionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The list of previous versions of the list item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: ListItemVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property versions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ListItemVersionItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ListItemVersionItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ListItemVersionItemRequestBuilder(self.request_adapter, raw_url) + + @property + def fields(self) -> FieldsRequestBuilder: + """ + Provides operations to manage the fields property of the microsoft.graph.listItemVersion entity. + """ + from .fields.fields_request_builder import FieldsRequestBuilder + + return FieldsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def restore_version(self) -> RestoreVersionRequestBuilder: + """ + Provides operations to call the restoreVersion method. + """ + from .restore_version.restore_version_request_builder import RestoreVersionRequestBuilder + + return RestoreVersionRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ListItemVersionItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ListItemVersionItemRequestBuilderGetQueryParameters(): + """ + The list of previous versions of the list item. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ListItemVersionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[ListItemVersionItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ListItemVersionItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/restore_version/restore_version_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/restore_version/restore_version_request_builder.py new file mode 100644 index 00000000000..fa8f1fee3a5 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/item/restore_version/restore_version_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ............models.o_data_errors.o_data_error import ODataError + +class RestoreVersionRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the restoreVersion method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RestoreVersionRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/versions/{listItemVersion%2Did}/restoreVersion", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/listitemversion-restore?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ............models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Restore a previous version of a ListItem to be the current version. This will create a new version with the contents of the previous version, but preserves all existing versions of the item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RestoreVersionRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RestoreVersionRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RestoreVersionRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RestoreVersionRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/versions_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/versions_request_builder.py new file mode 100644 index 00000000000..c97788feee2 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/item/versions/versions_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.list_item_version import ListItemVersion + from ..........models.list_item_version_collection_response import ListItemVersionCollectionResponse + from ..........models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.list_item_version_item_request_builder import ListItemVersionItemRequestBuilder + +class VersionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the versions property of the microsoft.graph.listItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new VersionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items/{listItem%2Did}/versions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_list_item_version_id(self,list_item_version_id: str) -> ListItemVersionItemRequestBuilder: + """ + Provides operations to manage the versions property of the microsoft.graph.listItem entity. + param list_item_version_id: The unique identifier of listItemVersion + Returns: ListItemVersionItemRequestBuilder + """ + if not list_item_version_id: + raise TypeError("list_item_version_id cannot be null.") + from .item.list_item_version_item_request_builder import ListItemVersionItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["listItemVersion%2Did"] = list_item_version_id + return ListItemVersionItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[VersionsRequestBuilderGetQueryParameters]] = None) -> Optional[ListItemVersionCollectionResponse]: + """ + The list of previous versions of the list item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListItemVersionCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.list_item_version_collection_response import ListItemVersionCollectionResponse + + return await self.request_adapter.send_async(request_info, ListItemVersionCollectionResponse, error_mapping) + + async def post(self,body: ListItemVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ListItemVersion]: + """ + Create new navigation property to versions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListItemVersion] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..........models.list_item_version import ListItemVersion + + return await self.request_adapter.send_async(request_info, ListItemVersion, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[VersionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The list of previous versions of the list item. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ListItemVersion, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to versions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> VersionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: VersionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return VersionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class VersionsRequestBuilderGetQueryParameters(): + """ + The list of previous versions of the list item. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class VersionsRequestBuilderGetRequestConfiguration(RequestConfiguration[VersionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class VersionsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/items_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/items_request_builder.py new file mode 100644 index 00000000000..40ab90f082f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/items/items_request_builder.py @@ -0,0 +1,215 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.list_item import ListItem + from ........models.list_item_collection_response import ListItemCollectionResponse + from ........models.o_data_errors.o_data_error import ODataError + from .delta.delta_request_builder import DeltaRequestBuilder + from .delta_with_token.delta_with_token_request_builder import DeltaWithTokenRequestBuilder + from .item.list_item_item_request_builder import ListItemItemRequestBuilder + +class ItemsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the items property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ItemsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/items{?%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_list_item_id(self,list_item_id: str) -> ListItemItemRequestBuilder: + """ + Provides operations to manage the items property of the microsoft.graph.list entity. + param list_item_id: The unique identifier of listItem + Returns: ListItemItemRequestBuilder + """ + if not list_item_id: + raise TypeError("list_item_id cannot be null.") + from .item.list_item_item_request_builder import ListItemItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["listItem%2Did"] = list_item_id + return ListItemItemRequestBuilder(self.request_adapter, url_tpl_params) + + def delta_with_token(self,token: str) -> DeltaWithTokenRequestBuilder: + """ + Provides operations to call the delta method. + param token: Usage: token='{token}' + Returns: DeltaWithTokenRequestBuilder + """ + if not token: + raise TypeError("token cannot be null.") + from .delta_with_token.delta_with_token_request_builder import DeltaWithTokenRequestBuilder + + return DeltaWithTokenRequestBuilder(self.request_adapter, self.path_parameters, token) + + async def get(self,request_configuration: Optional[RequestConfiguration[ItemsRequestBuilderGetQueryParameters]] = None) -> Optional[ListItemCollectionResponse]: + """ + All items contained in the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.list_item_collection_response import ListItemCollectionResponse + + return await self.request_adapter.send_async(request_info, ListItemCollectionResponse, error_mapping) + + async def post(self,body: ListItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ListItem]: + """ + Create new navigation property to items for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ListItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.list_item import ListItem + + return await self.request_adapter.send_async(request_info, ListItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ItemsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + All items contained in the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: ListItem, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to items for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ItemsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ItemsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ItemsRequestBuilder(self.request_adapter, raw_url) + + @property + def delta(self) -> DeltaRequestBuilder: + """ + Provides operations to call the delta method. + """ + from .delta.delta_request_builder import DeltaRequestBuilder + + return DeltaRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ItemsRequestBuilderGetQueryParameters(): + """ + All items contained in the list. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ItemsRequestBuilderGetRequestConfiguration(RequestConfiguration[ItemsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ItemsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/last_modified_by_user_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/last_modified_by_user_request_builder.py new file mode 100644 index 00000000000..08d4d235e77 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/last_modified_by_user_request_builder.py @@ -0,0 +1,126 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.user import User + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + +class LastModifiedByUserRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new LastModifiedByUserRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/lastModifiedByUser{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]] = None) -> Optional[User]: + """ + Identity of the user who last modified the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[User] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.user import User + + return await self.request_adapter.send_async(request_info, User, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Identity of the user who last modified the item. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> LastModifiedByUserRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: LastModifiedByUserRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return LastModifiedByUserRequestBuilder(self.request_adapter, raw_url) + + @property + def mailbox_settings(self) -> MailboxSettingsRequestBuilder: + """ + The mailboxSettings property + """ + from .mailbox_settings.mailbox_settings_request_builder import MailboxSettingsRequestBuilder + + return MailboxSettingsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def service_provisioning_errors(self) -> ServiceProvisioningErrorsRequestBuilder: + """ + The serviceProvisioningErrors property + """ + from .service_provisioning_errors.service_provisioning_errors_request_builder import ServiceProvisioningErrorsRequestBuilder + + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class LastModifiedByUserRequestBuilderGetQueryParameters(): + """ + Identity of the user who last modified the item. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class LastModifiedByUserRequestBuilderGetRequestConfiguration(RequestConfiguration[LastModifiedByUserRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py new file mode 100644 index 00000000000..18b84fe742f --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/mailbox_settings/mailbox_settings_request_builder.py @@ -0,0 +1,151 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.mailbox_settings import MailboxSettings + from .........models.o_data_errors.o_data_error import ODataError + +class MailboxSettingsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/list/lastModifiedByUser/mailboxSettings + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new MailboxSettingsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/lastModifiedByUser/mailboxSettings{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + async def patch(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MailboxSettings]: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[MailboxSettings] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.mailbox_settings import MailboxSettings + + return await self.request_adapter.send_async(request_info, MailboxSettings, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: MailboxSettings, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update property mailboxSettings value. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> MailboxSettingsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: MailboxSettingsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return MailboxSettingsRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class MailboxSettingsRequestBuilderGetQueryParameters(): + """ + Settings for the primary mailbox of the signed-in user. You can get or update settings for sending automatic replies to incoming messages, locale, and time zone. Returned only on $select. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class MailboxSettingsRequestBuilderGetRequestConfiguration(RequestConfiguration[MailboxSettingsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class MailboxSettingsRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py new file mode 100644 index 00000000000..084cd89710a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/service_provisioning_errors/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/lastModifiedByUser/serviceProvisioningErrors/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py new file mode 100644 index 00000000000..6b1c85e9b46 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/last_modified_by_user/service_provisioning_errors/service_provisioning_errors_request_builder.py @@ -0,0 +1,146 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + from .count.count_request_builder import CountRequestBuilder + +class ServiceProvisioningErrorsRequestBuilder(BaseRequestBuilder): + """ + Builds and executes requests for operations under /storage/fileStorage/containers/{fileStorageContainer-id}/drive/list/lastModifiedByUser/serviceProvisioningErrors + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ServiceProvisioningErrorsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/lastModifiedByUser/serviceProvisioningErrors{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> Optional[ServiceProvisioningErrorCollectionResponse]: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[ServiceProvisioningErrorCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.service_provisioning_error_collection_response import ServiceProvisioningErrorCollectionResponse + + return await self.request_adapter.send_async(request_info, ServiceProvisioningErrorCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ServiceProvisioningErrorsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ServiceProvisioningErrorsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ServiceProvisioningErrorsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetQueryParameters(): + """ + Errors published by a federated service describing a non-transient, service-specific error regarding the properties or link from a user object . Supports $filter (eq, not, for isResolved and serviceInstance). + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class ServiceProvisioningErrorsRequestBuilderGetRequestConfiguration(RequestConfiguration[ServiceProvisioningErrorsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/list_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/list_request_builder.py new file mode 100644 index 00000000000..1ca57bd2d62 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/list_request_builder.py @@ -0,0 +1,267 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.list_ import List_ + from .......models.o_data_errors.o_data_error import ODataError + from .columns.columns_request_builder import ColumnsRequestBuilder + from .content_types.content_types_request_builder import ContentTypesRequestBuilder + from .created_by_user.created_by_user_request_builder import CreatedByUserRequestBuilder + from .drive.drive_request_builder import DriveRequestBuilder + from .items.items_request_builder import ItemsRequestBuilder + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + from .operations.operations_request_builder import OperationsRequestBuilder + from .subscriptions.subscriptions_request_builder import SubscriptionsRequestBuilder + +class ListRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the list property of the microsoft.graph.drive entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ListRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property list for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ListRequestBuilderGetQueryParameters]] = None) -> Optional[List_]: + """ + For drives in SharePoint, the underlying document library list. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[List_] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.list_ import List_ + + return await self.request_adapter.send_async(request_info, List_, error_mapping) + + async def patch(self,body: List_, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[List_]: + """ + Update the navigation property list in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[List_] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.list_ import List_ + + return await self.request_adapter.send_async(request_info, List_, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property list for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ListRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + For drives in SharePoint, the underlying document library list. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: List_, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property list in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> ListRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ListRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ListRequestBuilder(self.request_adapter, raw_url) + + @property + def columns(self) -> ColumnsRequestBuilder: + """ + Provides operations to manage the columns property of the microsoft.graph.list entity. + """ + from .columns.columns_request_builder import ColumnsRequestBuilder + + return ColumnsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def content_types(self) -> ContentTypesRequestBuilder: + """ + Provides operations to manage the contentTypes property of the microsoft.graph.list entity. + """ + from .content_types.content_types_request_builder import ContentTypesRequestBuilder + + return ContentTypesRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def created_by_user(self) -> CreatedByUserRequestBuilder: + """ + Provides operations to manage the createdByUser property of the microsoft.graph.baseItem entity. + """ + from .created_by_user.created_by_user_request_builder import CreatedByUserRequestBuilder + + return CreatedByUserRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def drive(self) -> DriveRequestBuilder: + """ + Provides operations to manage the drive property of the microsoft.graph.list entity. + """ + from .drive.drive_request_builder import DriveRequestBuilder + + return DriveRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def items(self) -> ItemsRequestBuilder: + """ + Provides operations to manage the items property of the microsoft.graph.list entity. + """ + from .items.items_request_builder import ItemsRequestBuilder + + return ItemsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def last_modified_by_user(self) -> LastModifiedByUserRequestBuilder: + """ + Provides operations to manage the lastModifiedByUser property of the microsoft.graph.baseItem entity. + """ + from .last_modified_by_user.last_modified_by_user_request_builder import LastModifiedByUserRequestBuilder + + return LastModifiedByUserRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def operations(self) -> OperationsRequestBuilder: + """ + Provides operations to manage the operations property of the microsoft.graph.list entity. + """ + from .operations.operations_request_builder import OperationsRequestBuilder + + return OperationsRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def subscriptions(self) -> SubscriptionsRequestBuilder: + """ + Provides operations to manage the subscriptions property of the microsoft.graph.list entity. + """ + from .subscriptions.subscriptions_request_builder import SubscriptionsRequestBuilder + + return SubscriptionsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class ListRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ListRequestBuilderGetQueryParameters(): + """ + For drives in SharePoint, the underlying document library list. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class ListRequestBuilderGetRequestConfiguration(RequestConfiguration[ListRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ListRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/count/count_request_builder.py new file mode 100644 index 00000000000..8182282a036 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/operations/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/item/rich_long_running_operation_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/item/rich_long_running_operation_item_request_builder.py new file mode 100644 index 00000000000..ab04c4e365b --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/item/rich_long_running_operation_item_request_builder.py @@ -0,0 +1,187 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.rich_long_running_operation import RichLongRunningOperation + +class RichLongRunningOperationItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the operations property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RichLongRunningOperationItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/operations/{richLongRunningOperation%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property operations for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[RichLongRunningOperationItemRequestBuilderGetQueryParameters]] = None) -> Optional[RichLongRunningOperation]: + """ + The collection of long-running operations on the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[RichLongRunningOperation] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.rich_long_running_operation import RichLongRunningOperation + + return await self.request_adapter.send_async(request_info, RichLongRunningOperation, error_mapping) + + async def patch(self,body: RichLongRunningOperation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[RichLongRunningOperation]: + """ + Update the navigation property operations in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[RichLongRunningOperation] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.rich_long_running_operation import RichLongRunningOperation + + return await self.request_adapter.send_async(request_info, RichLongRunningOperation, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property operations for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RichLongRunningOperationItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of long-running operations on the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: RichLongRunningOperation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property operations in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> RichLongRunningOperationItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RichLongRunningOperationItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RichLongRunningOperationItemRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RichLongRunningOperationItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RichLongRunningOperationItemRequestBuilderGetQueryParameters(): + """ + The collection of long-running operations on the list. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class RichLongRunningOperationItemRequestBuilderGetRequestConfiguration(RequestConfiguration[RichLongRunningOperationItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class RichLongRunningOperationItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/operations_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/operations_request_builder.py new file mode 100644 index 00000000000..37ac7cf7f0a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/operations/operations_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.rich_long_running_operation import RichLongRunningOperation + from ........models.rich_long_running_operation_collection_response import RichLongRunningOperationCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.rich_long_running_operation_item_request_builder import RichLongRunningOperationItemRequestBuilder + +class OperationsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the operations property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new OperationsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/operations{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_rich_long_running_operation_id(self,rich_long_running_operation_id: str) -> RichLongRunningOperationItemRequestBuilder: + """ + Provides operations to manage the operations property of the microsoft.graph.list entity. + param rich_long_running_operation_id: The unique identifier of richLongRunningOperation + Returns: RichLongRunningOperationItemRequestBuilder + """ + if not rich_long_running_operation_id: + raise TypeError("rich_long_running_operation_id cannot be null.") + from .item.rich_long_running_operation_item_request_builder import RichLongRunningOperationItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["richLongRunningOperation%2Did"] = rich_long_running_operation_id + return RichLongRunningOperationItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[OperationsRequestBuilderGetQueryParameters]] = None) -> Optional[RichLongRunningOperationCollectionResponse]: + """ + The collection of long-running operations on the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[RichLongRunningOperationCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.rich_long_running_operation_collection_response import RichLongRunningOperationCollectionResponse + + return await self.request_adapter.send_async(request_info, RichLongRunningOperationCollectionResponse, error_mapping) + + async def post(self,body: RichLongRunningOperation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[RichLongRunningOperation]: + """ + Create new navigation property to operations for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[RichLongRunningOperation] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.rich_long_running_operation import RichLongRunningOperation + + return await self.request_adapter.send_async(request_info, RichLongRunningOperation, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[OperationsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The collection of long-running operations on the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: RichLongRunningOperation, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to operations for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> OperationsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: OperationsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return OperationsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class OperationsRequestBuilderGetQueryParameters(): + """ + The collection of long-running operations on the list. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class OperationsRequestBuilderGetRequestConfiguration(RequestConfiguration[OperationsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class OperationsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/count/count_request_builder.py new file mode 100644 index 00000000000..46ccba68d62 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/subscriptions/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py new file mode 100644 index 00000000000..19c309cd686 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/item/reauthorize/reauthorize_request_builder.py @@ -0,0 +1,78 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..........models.o_data_errors.o_data_error import ODataError + +class ReauthorizeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the reauthorize method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ReauthorizeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/subscriptions/{subscription%2Did}/reauthorize", path_parameters) + + async def post(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Reauthorize a subscription when you receive a reauthorizationRequired challenge. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + Find more info here: https://learn.microsoft.com/graph/api/subscription-reauthorize?view=graph-rest-1.0 + """ + request_info = self.to_post_request_information( + request_configuration + ) + from ..........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + def to_post_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Reauthorize a subscription when you receive a reauthorizationRequired challenge. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> ReauthorizeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ReauthorizeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ReauthorizeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ReauthorizeRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/item/subscription_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/item/subscription_item_request_builder.py new file mode 100644 index 00000000000..3f642ff215d --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/item/subscription_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.o_data_errors.o_data_error import ODataError + from .........models.subscription import Subscription + from .reauthorize.reauthorize_request_builder import ReauthorizeRequestBuilder + +class SubscriptionItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the subscriptions property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SubscriptionItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/subscriptions/{subscription%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property subscriptions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[SubscriptionItemRequestBuilderGetQueryParameters]] = None) -> Optional[Subscription]: + """ + The set of subscriptions on the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Subscription] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.subscription import Subscription + + return await self.request_adapter.send_async(request_info, Subscription, error_mapping) + + async def patch(self,body: Subscription, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Subscription]: + """ + Update the navigation property subscriptions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Subscription] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.subscription import Subscription + + return await self.request_adapter.send_async(request_info, Subscription, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property subscriptions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SubscriptionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The set of subscriptions on the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Subscription, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property subscriptions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SubscriptionItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SubscriptionItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SubscriptionItemRequestBuilder(self.request_adapter, raw_url) + + @property + def reauthorize(self) -> ReauthorizeRequestBuilder: + """ + Provides operations to call the reauthorize method. + """ + from .reauthorize.reauthorize_request_builder import ReauthorizeRequestBuilder + + return ReauthorizeRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SubscriptionItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SubscriptionItemRequestBuilderGetQueryParameters(): + """ + The set of subscriptions on the list. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class SubscriptionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[SubscriptionItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SubscriptionItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/subscriptions_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/subscriptions_request_builder.py new file mode 100644 index 00000000000..bc2678a9616 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/list_/subscriptions/subscriptions_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from ........models.subscription import Subscription + from ........models.subscription_collection_response import SubscriptionCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.subscription_item_request_builder import SubscriptionItemRequestBuilder + +class SubscriptionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the subscriptions property of the microsoft.graph.list entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SubscriptionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/list/subscriptions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_subscription_id(self,subscription_id: str) -> SubscriptionItemRequestBuilder: + """ + Provides operations to manage the subscriptions property of the microsoft.graph.list entity. + param subscription_id: The unique identifier of subscription + Returns: SubscriptionItemRequestBuilder + """ + if not subscription_id: + raise TypeError("subscription_id cannot be null.") + from .item.subscription_item_request_builder import SubscriptionItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["subscription%2Did"] = subscription_id + return SubscriptionItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[SubscriptionsRequestBuilderGetQueryParameters]] = None) -> Optional[SubscriptionCollectionResponse]: + """ + The set of subscriptions on the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SubscriptionCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.subscription_collection_response import SubscriptionCollectionResponse + + return await self.request_adapter.send_async(request_info, SubscriptionCollectionResponse, error_mapping) + + async def post(self,body: Subscription, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Subscription]: + """ + Create new navigation property to subscriptions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Subscription] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.subscription import Subscription + + return await self.request_adapter.send_async(request_info, Subscription, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SubscriptionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The set of subscriptions on the list. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Subscription, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to subscriptions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> SubscriptionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SubscriptionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SubscriptionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SubscriptionsRequestBuilderGetQueryParameters(): + """ + The set of subscriptions on the list. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class SubscriptionsRequestBuilderGetRequestConfiguration(RequestConfiguration[SubscriptionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class SubscriptionsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/recent/recent_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/recent/recent_get_response.py new file mode 100644 index 00000000000..b44cab8d0f6 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/recent/recent_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .......models.drive_item import DriveItem + +from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class RecentGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DriveItem]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> RecentGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: RecentGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return RecentGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .......models.drive_item import DriveItem + + from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .......models.drive_item import DriveItem + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DriveItem)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/recent/recent_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/recent/recent_request_builder.py new file mode 100644 index 00000000000..c65c6ca0d50 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/recent/recent_request_builder.py @@ -0,0 +1,137 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .recent_get_response import RecentGetResponse + +class RecentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the recent method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RecentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/recent(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[RecentRequestBuilderGetQueryParameters]] = None) -> Optional[RecentGetResponse]: + """ + List a set of items that have been recently used by the signed in user.This collection includes items that are in the user's drive and items they have access to from other drives. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[RecentGetResponse] + Find more info here: https://learn.microsoft.com/graph/api/drive-recent?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .recent_get_response import RecentGetResponse + + return await self.request_adapter.send_async(request_info, RecentGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RecentRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + List a set of items that have been recently used by the signed in user.This collection includes items that are in the user's drive and items they have access to from other drives. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RecentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RecentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RecentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class RecentRequestBuilderGetQueryParameters(): + """ + List a set of items that have been recently used by the signed in user.This collection includes items that are in the user's drive and items they have access to from other drives. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class RecentRequestBuilderGetRequestConfiguration(RequestConfiguration[RecentRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/root/content/content_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/root/content/content_request_builder.py new file mode 100644 index 00000000000..ee42f736499 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/root/content/content_request_builder.py @@ -0,0 +1,180 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.drive_item import DriveItem + from ........models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the storage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/root/content{?%24format*}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> bytes: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/octet-stream, application/json") + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body, "application/octet-stream") + return request_info + + def with_url(self,raw_url: str) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ContentRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderGetQueryParameters(): + """ + The content stream, if the item represents a file. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "format": + return "%24format" + return original_name + + # Format of the content + format: Optional[str] = None + + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/root/root_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/root/root_request_builder.py new file mode 100644 index 00000000000..b35ce25d9cc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/root/root_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.drive_item import DriveItem + from .......models.o_data_errors.o_data_error import ODataError + from .content.content_request_builder import ContentRequestBuilder + +class RootRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the root property of the microsoft.graph.drive entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new RootRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/root{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[RootRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItem]: + """ + The root folder of the drive. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[RootRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The root folder of the drive. Read-only. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> RootRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: RootRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return RootRequestBuilder(self.request_adapter, raw_url) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the storage entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class RootRequestBuilderGetQueryParameters(): + """ + The root folder of the drive. Read-only. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class RootRequestBuilderGetRequestConfiguration(RequestConfiguration[RootRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/search_with_q/search_with_q_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/search_with_q/search_with_q_get_response.py new file mode 100644 index 00000000000..cfdb0a3b421 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/search_with_q/search_with_q_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .......models.drive_item import DriveItem + +from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class SearchWithQGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DriveItem]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SearchWithQGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SearchWithQGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SearchWithQGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .......models.drive_item import DriveItem + + from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .......models.drive_item import DriveItem + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DriveItem)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/search_with_q/search_with_q_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/search_with_q/search_with_q_request_builder.py new file mode 100644 index 00000000000..d6ceed3992a --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/search_with_q/search_with_q_request_builder.py @@ -0,0 +1,140 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .search_with_q_get_response import SearchWithQGetResponse + +class SearchWithQRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the search method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]], q: Optional[str] = None) -> None: + """ + Instantiates a new SearchWithQRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param q: Usage: q='{q}' + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + if isinstance(path_parameters, dict): + path_parameters['q'] = str(q) + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/search(q='{q}'){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[SearchWithQRequestBuilderGetQueryParameters]] = None) -> Optional[SearchWithQGetResponse]: + """ + Search the hierarchy of items for items matching a query.You can search within a folder hierarchy, a whole drive, or files shared with the current user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SearchWithQGetResponse] + Find more info here: https://learn.microsoft.com/graph/api/driveitem-search?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .search_with_q_get_response import SearchWithQGetResponse + + return await self.request_adapter.send_async(request_info, SearchWithQGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SearchWithQRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Search the hierarchy of items for items matching a query.You can search within a folder hierarchy, a whole drive, or files shared with the current user. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> SearchWithQRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SearchWithQRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SearchWithQRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SearchWithQRequestBuilderGetQueryParameters(): + """ + Search the hierarchy of items for items matching a query.You can search within a folder hierarchy, a whole drive, or files shared with the current user. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class SearchWithQRequestBuilderGetRequestConfiguration(RequestConfiguration[SearchWithQRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/shared_with_me/shared_with_me_get_response.py b/msgraph/generated/storage/file_storage/containers/item/drive/shared_with_me/shared_with_me_get_response.py new file mode 100644 index 00000000000..ad770166240 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/shared_with_me/shared_with_me_get_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .......models.drive_item import DriveItem + +from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class SharedWithMeGetResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[DriveItem]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> SharedWithMeGetResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: SharedWithMeGetResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return SharedWithMeGetResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .......models.drive_item import DriveItem + + from .......models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from .......models.drive_item import DriveItem + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(DriveItem)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/shared_with_me/shared_with_me_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/shared_with_me/shared_with_me_request_builder.py new file mode 100644 index 00000000000..2c800eeadaf --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/shared_with_me/shared_with_me_request_builder.py @@ -0,0 +1,137 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .shared_with_me_get_response import SharedWithMeGetResponse + +class SharedWithMeRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the sharedWithMe method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SharedWithMeRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/sharedWithMe(){?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[SharedWithMeRequestBuilderGetQueryParameters]] = None) -> Optional[SharedWithMeGetResponse]: + """ + Get a list of driveItem objects shared with the owner of a drive. The driveItems returned from the sharedWithMe method always include the remoteItem facet that indicates they are items from a different drive. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[SharedWithMeGetResponse] + Find more info here: https://learn.microsoft.com/graph/api/drive-sharedwithme?view=graph-rest-1.0 + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .shared_with_me_get_response import SharedWithMeGetResponse + + return await self.request_adapter.send_async(request_info, SharedWithMeGetResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SharedWithMeRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get a list of driveItem objects shared with the owner of a drive. The driveItems returned from the sharedWithMe method always include the remoteItem facet that indicates they are items from a different drive. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> SharedWithMeRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SharedWithMeRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SharedWithMeRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class SharedWithMeRequestBuilderGetQueryParameters(): + """ + Get a list of driveItem objects shared with the owner of a drive. The driveItems returned from the sharedWithMe method always include the remoteItem facet that indicates they are items from a different drive. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class SharedWithMeRequestBuilderGetRequestConfiguration(RequestConfiguration[SharedWithMeRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/special/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/special/count/count_request_builder.py new file mode 100644 index 00000000000..759de93f42c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/special/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/special/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/special/item/content/content_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/special/item/content/content_request_builder.py new file mode 100644 index 00000000000..1767fabd2f7 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/special/item/content/content_request_builder.py @@ -0,0 +1,180 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .........models.drive_item import DriveItem + from .........models.o_data_errors.o_data_error import ODataError + +class ContentRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the media for the storage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new ContentRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/special/{driveItem%2Did}/content{?%24format*}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> bytes: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: bytes + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "bytes", error_mapping) + + async def put(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[DriveItem]: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_put_request_information( + body, request_configuration + ) + from .........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[ContentRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/octet-stream, application/json") + return request_info + + def to_put_request_information(self,body: bytes, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + The content stream, if the item represents a file. + param body: Binary request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PUT, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_stream_content(body, "application/octet-stream") + return request_info + + def with_url(self,raw_url: str) -> ContentRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: ContentRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return ContentRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class ContentRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderGetQueryParameters(): + """ + The content stream, if the item represents a file. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "format": + return "%24format" + return original_name + + # Format of the content + format: Optional[str] = None + + + @dataclass + class ContentRequestBuilderGetRequestConfiguration(RequestConfiguration[ContentRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class ContentRequestBuilderPutRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/special/item/drive_item_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/special/item/drive_item_item_request_builder.py new file mode 100644 index 00000000000..5b5904fb949 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/special/item/drive_item_item_request_builder.py @@ -0,0 +1,116 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.drive_item import DriveItem + from ........models.o_data_errors.o_data_error import ODataError + from .content.content_request_builder import ContentRequestBuilder + +class DriveItemItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the special property of the microsoft.graph.drive entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new DriveItemItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/special/{driveItem%2Did}{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItem]: + """ + Collection of common folders available in OneDrive. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItem] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ........models.drive_item import DriveItem + + return await self.request_adapter.send_async(request_info, DriveItem, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection of common folders available in OneDrive. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> DriveItemItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: DriveItemItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return DriveItemItemRequestBuilder(self.request_adapter, raw_url) + + @property + def content(self) -> ContentRequestBuilder: + """ + Provides operations to manage the media for the storage entity. + """ + from .content.content_request_builder import ContentRequestBuilder + + return ContentRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class DriveItemItemRequestBuilderGetQueryParameters(): + """ + Collection of common folders available in OneDrive. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class DriveItemItemRequestBuilderGetRequestConfiguration(RequestConfiguration[DriveItemItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/drive/special/special_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/drive/special/special_request_builder.py new file mode 100644 index 00000000000..a557674dd62 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/drive/special/special_request_builder.py @@ -0,0 +1,161 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.drive_item_collection_response import DriveItemCollectionResponse + from .......models.o_data_errors.o_data_error import ODataError + from .count.count_request_builder import CountRequestBuilder + from .item.drive_item_item_request_builder import DriveItemItemRequestBuilder + +class SpecialRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the special property of the microsoft.graph.drive entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new SpecialRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/drive/special{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_drive_item_id(self,drive_item_id: str) -> DriveItemItemRequestBuilder: + """ + Provides operations to manage the special property of the microsoft.graph.drive entity. + param drive_item_id: The unique identifier of driveItem + Returns: DriveItemItemRequestBuilder + """ + if not drive_item_id: + raise TypeError("drive_item_id cannot be null.") + from .item.drive_item_item_request_builder import DriveItemItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["driveItem%2Did"] = drive_item_id + return DriveItemItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[SpecialRequestBuilderGetQueryParameters]] = None) -> Optional[DriveItemCollectionResponse]: + """ + Collection of common folders available in OneDrive. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[DriveItemCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.drive_item_collection_response import DriveItemCollectionResponse + + return await self.request_adapter.send_async(request_info, DriveItemCollectionResponse, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SpecialRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Collection of common folders available in OneDrive. Read-only. Nullable. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def with_url(self,raw_url: str) -> SpecialRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: SpecialRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return SpecialRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class SpecialRequestBuilderGetQueryParameters(): + """ + Collection of common folders available in OneDrive. Read-only. Nullable. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class SpecialRequestBuilderGetRequestConfiguration(RequestConfiguration[SpecialRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/file_storage_container_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/file_storage_container_item_request_builder.py new file mode 100644 index 00000000000..24a13b8dcfc --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/file_storage_container_item_request_builder.py @@ -0,0 +1,217 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .....models.file_storage_container import FileStorageContainer + from .....models.o_data_errors.o_data_error import ODataError + from .activate.activate_request_builder import ActivateRequestBuilder + from .drive.drive_request_builder import DriveRequestBuilder + from .permissions.permissions_request_builder import PermissionsRequestBuilder + +class FileStorageContainerItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the containers property of the microsoft.graph.fileStorage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FileStorageContainerItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property containers for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FileStorageContainerItemRequestBuilderGetQueryParameters]] = None) -> Optional[FileStorageContainer]: + """ + Get containers from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FileStorageContainer] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.file_storage_container import FileStorageContainer + + return await self.request_adapter.send_async(request_info, FileStorageContainer, error_mapping) + + async def patch(self,body: FileStorageContainer, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[FileStorageContainer]: + """ + Update the navigation property containers in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FileStorageContainer] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .....models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .....models.file_storage_container import FileStorageContainer + + return await self.request_adapter.send_async(request_info, FileStorageContainer, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property containers for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FileStorageContainerItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get containers from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: FileStorageContainer, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property containers in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FileStorageContainerItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FileStorageContainerItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FileStorageContainerItemRequestBuilder(self.request_adapter, raw_url) + + @property + def activate(self) -> ActivateRequestBuilder: + """ + Provides operations to call the activate method. + """ + from .activate.activate_request_builder import ActivateRequestBuilder + + return ActivateRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def drive(self) -> DriveRequestBuilder: + """ + Provides operations to manage the drive property of the microsoft.graph.fileStorageContainer entity. + """ + from .drive.drive_request_builder import DriveRequestBuilder + + return DriveRequestBuilder(self.request_adapter, self.path_parameters) + + @property + def permissions(self) -> PermissionsRequestBuilder: + """ + Provides operations to manage the permissions property of the microsoft.graph.fileStorageContainer entity. + """ + from .permissions.permissions_request_builder import PermissionsRequestBuilder + + return PermissionsRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FileStorageContainerItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FileStorageContainerItemRequestBuilderGetQueryParameters(): + """ + Get containers from storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FileStorageContainerItemRequestBuilderGetRequestConfiguration(RequestConfiguration[FileStorageContainerItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FileStorageContainerItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/permissions/count/count_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/permissions/count/count_request_builder.py new file mode 100644 index 00000000000..b76072723fa --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/permissions/count/count_request_builder.py @@ -0,0 +1,103 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + +class CountRequestBuilder(BaseRequestBuilder): + """ + Provides operations to count the resources in the collection. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new CountRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/permissions/$count{?%24filter,%24search}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> Optional[int]: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[int] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_primitive_async(request_info, "int", error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[CountRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get the number of the resource + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "text/plain;q=0.9") + return request_info + + def with_url(self,raw_url: str) -> CountRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: CountRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return CountRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class CountRequestBuilderGetQueryParameters(): + """ + Get the number of the resource + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "filter": + return "%24filter" + if original_name == "search": + return "%24search" + return original_name + + # Filter items by property values + filter: Optional[str] = None + + # Search items by search phrases + search: Optional[str] = None + + + @dataclass + class CountRequestBuilderGetRequestConfiguration(RequestConfiguration[CountRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_post_request_body.py b/msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_post_request_body.py new file mode 100644 index 00000000000..25fa205c219 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_post_request_body.py @@ -0,0 +1,60 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import AdditionalDataHolder, Parsable, ParseNode, SerializationWriter +from kiota_abstractions.store import BackedModel, BackingStore, BackingStoreFactorySingleton +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.drive_recipient import DriveRecipient + +@dataclass +class GrantPostRequestBody(AdditionalDataHolder, BackedModel, Parsable): + # Stores model information. + backing_store: BackingStore = field(default_factory=BackingStoreFactorySingleton(backing_store_factory=None).backing_store_factory.create_backing_store, repr=False) + + # Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additional_data: Dict[str, Any] = field(default_factory=dict) + # The recipients property + recipients: Optional[List[DriveRecipient]] = None + # The roles property + roles: Optional[List[str]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GrantPostRequestBody: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GrantPostRequestBody + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GrantPostRequestBody() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ........models.drive_recipient import DriveRecipient + + from ........models.drive_recipient import DriveRecipient + + fields: Dict[str, Callable[[Any], None]] = { + "recipients": lambda n : setattr(self, 'recipients', n.get_collection_of_object_values(DriveRecipient)), + "roles": lambda n : setattr(self, 'roles', n.get_collection_of_primitive_values(str)), + } + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + writer.write_collection_of_object_values("recipients", self.recipients) + writer.write_collection_of_primitive_values("roles", self.roles) + writer.write_additional_data_value(self.additional_data) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_post_response.py b/msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_post_response.py new file mode 100644 index 00000000000..04cba69d39c --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_post_response.py @@ -0,0 +1,57 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.serialization import Parsable, ParseNode, SerializationWriter +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union + +if TYPE_CHECKING: + from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ........models.permission import Permission + +from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + +@dataclass +class GrantPostResponse(BaseCollectionPaginationCountResponse): + # The value property + value: Optional[List[Permission]] = None + + @staticmethod + def create_from_discriminator_value(parse_node: ParseNode) -> GrantPostResponse: + """ + Creates a new instance of the appropriate class based on discriminator value + param parse_node: The parse node to use to read the discriminator value and create the object + Returns: GrantPostResponse + """ + if not parse_node: + raise TypeError("parse_node cannot be null.") + return GrantPostResponse() + + def get_field_deserializers(self,) -> Dict[str, Callable[[ParseNode], None]]: + """ + The deserialization information for the current model + Returns: Dict[str, Callable[[ParseNode], None]] + """ + from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ........models.permission import Permission + + from ........models.base_collection_pagination_count_response import BaseCollectionPaginationCountResponse + from ........models.permission import Permission + + fields: Dict[str, Callable[[Any], None]] = { + "value": lambda n : setattr(self, 'value', n.get_collection_of_object_values(Permission)), + } + super_fields = super().get_field_deserializers() + fields.update(super_fields) + return fields + + def serialize(self,writer: SerializationWriter) -> None: + """ + Serializes information the current object + param writer: Serialization writer to use to serialize this model + Returns: None + """ + if not writer: + raise TypeError("writer cannot be null.") + super().serialize(writer) + writer.write_collection_of_object_values("value", self.value) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_request_builder.py new file mode 100644 index 00000000000..9be39066c93 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/permissions/item/grant/grant_request_builder.py @@ -0,0 +1,89 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ........models.o_data_errors.o_data_error import ODataError + from .grant_post_request_body import GrantPostRequestBody + from .grant_post_response import GrantPostResponse + +class GrantRequestBuilder(BaseRequestBuilder): + """ + Provides operations to call the grant method. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new GrantRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/permissions/{permission%2Did}/grant", path_parameters) + + async def post(self,body: GrantPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[GrantPostResponse]: + """ + Grant users access to a link represented by a permission. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[GrantPostResponse] + Find more info here: https://learn.microsoft.com/graph/api/permission-grant?view=graph-rest-1.0 + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ........models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .grant_post_response import GrantPostResponse + + return await self.request_adapter.send_async(request_info, GrantPostResponse, error_mapping) + + def to_post_request_information(self,body: GrantPostRequestBody, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Grant users access to a link represented by a permission. + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> GrantRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: GrantRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return GrantRequestBuilder(self.request_adapter, raw_url) + + @dataclass + class GrantRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/permissions/item/permission_item_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/permissions/item/permission_item_request_builder.py new file mode 100644 index 00000000000..2232c2da082 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/permissions/item/permission_item_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from .......models.o_data_errors.o_data_error import ODataError + from .......models.permission import Permission + from .grant.grant_request_builder import GrantRequestBuilder + +class PermissionItemRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the permissions property of the microsoft.graph.fileStorageContainer entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PermissionItemRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/permissions/{permission%2Did}{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property permissions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[PermissionItemRequestBuilderGetQueryParameters]] = None) -> Optional[Permission]: + """ + The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are 'reader', 'writer', 'manager', and 'owner'. Read-write. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Permission] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.permission import Permission + + return await self.request_adapter.send_async(request_info, Permission, error_mapping) + + async def patch(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Permission]: + """ + Update the navigation property permissions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Permission] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from .......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from .......models.permission import Permission + + return await self.request_adapter.send_async(request_info, Permission, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property permissions for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PermissionItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are 'reader', 'writer', 'manager', and 'owner'. Read-write. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property permissions in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PermissionItemRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PermissionItemRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PermissionItemRequestBuilder(self.request_adapter, raw_url) + + @property + def grant(self) -> GrantRequestBuilder: + """ + Provides operations to call the grant method. + """ + from .grant.grant_request_builder import GrantRequestBuilder + + return GrantRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class PermissionItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class PermissionItemRequestBuilderGetQueryParameters(): + """ + The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are 'reader', 'writer', 'manager', and 'owner'. Read-write. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class PermissionItemRequestBuilderGetRequestConfiguration(RequestConfiguration[PermissionItemRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class PermissionItemRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/containers/item/permissions/permissions_request_builder.py b/msgraph/generated/storage/file_storage/containers/item/permissions/permissions_request_builder.py new file mode 100644 index 00000000000..ec0737e6670 --- /dev/null +++ b/msgraph/generated/storage/file_storage/containers/item/permissions/permissions_request_builder.py @@ -0,0 +1,207 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ......models.o_data_errors.o_data_error import ODataError + from ......models.permission import Permission + from ......models.permission_collection_response import PermissionCollectionResponse + from .count.count_request_builder import CountRequestBuilder + from .item.permission_item_request_builder import PermissionItemRequestBuilder + +class PermissionsRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the permissions property of the microsoft.graph.fileStorageContainer entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new PermissionsRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage/containers/{fileStorageContainer%2Did}/permissions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", path_parameters) + + def by_permission_id(self,permission_id: str) -> PermissionItemRequestBuilder: + """ + Provides operations to manage the permissions property of the microsoft.graph.fileStorageContainer entity. + param permission_id: The unique identifier of permission + Returns: PermissionItemRequestBuilder + """ + if not permission_id: + raise TypeError("permission_id cannot be null.") + from .item.permission_item_request_builder import PermissionItemRequestBuilder + + url_tpl_params = get_path_parameters(self.path_parameters) + url_tpl_params["permission%2Did"] = permission_id + return PermissionItemRequestBuilder(self.request_adapter, url_tpl_params) + + async def get(self,request_configuration: Optional[RequestConfiguration[PermissionsRequestBuilderGetQueryParameters]] = None) -> Optional[PermissionCollectionResponse]: + """ + The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are 'reader', 'writer', 'manager', and 'owner'. Read-write. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[PermissionCollectionResponse] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.permission_collection_response import PermissionCollectionResponse + + return await self.request_adapter.send_async(request_info, PermissionCollectionResponse, error_mapping) + + async def post(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Permission]: + """ + Create new navigation property to permissions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Permission] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_post_request_information( + body, request_configuration + ) + from ......models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ......models.permission import Permission + + return await self.request_adapter.send_async(request_info, Permission, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PermissionsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are 'reader', 'writer', 'manager', and 'owner'. Read-write. + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_post_request_information(self,body: Permission, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Create new navigation property to permissions for storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.POST, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> PermissionsRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: PermissionsRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return PermissionsRequestBuilder(self.request_adapter, raw_url) + + @property + def count(self) -> CountRequestBuilder: + """ + Provides operations to count the resources in the collection. + """ + from .count.count_request_builder import CountRequestBuilder + + return CountRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class PermissionsRequestBuilderGetQueryParameters(): + """ + The set of permissions for users in the fileStorageContainer. Permission for each user is set by the roles property. The possible values are 'reader', 'writer', 'manager', and 'owner'. Read-write. + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "count": + return "%24count" + if original_name == "expand": + return "%24expand" + if original_name == "filter": + return "%24filter" + if original_name == "orderby": + return "%24orderby" + if original_name == "search": + return "%24search" + if original_name == "select": + return "%24select" + if original_name == "skip": + return "%24skip" + if original_name == "top": + return "%24top" + return original_name + + # Include count of items + count: Optional[bool] = None + + # Expand related entities + expand: Optional[List[str]] = None + + # Filter items by property values + filter: Optional[str] = None + + # Order items by property values + orderby: Optional[List[str]] = None + + # Search items by search phrases + search: Optional[str] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + # Skip the first n items + skip: Optional[int] = None + + # Show only the first n items + top: Optional[int] = None + + + @dataclass + class PermissionsRequestBuilderGetRequestConfiguration(RequestConfiguration[PermissionsRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class PermissionsRequestBuilderPostRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/file_storage/file_storage_request_builder.py b/msgraph/generated/storage/file_storage/file_storage_request_builder.py new file mode 100644 index 00000000000..d86244bcc38 --- /dev/null +++ b/msgraph/generated/storage/file_storage/file_storage_request_builder.py @@ -0,0 +1,197 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ...models.file_storage import FileStorage + from ...models.o_data_errors.o_data_error import ODataError + from .containers.containers_request_builder import ContainersRequestBuilder + +class FileStorageRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the fileStorage property of the microsoft.graph.storage entity. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new FileStorageRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage/fileStorage{?%24expand,%24select}", path_parameters) + + async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: + """ + Delete navigation property fileStorage for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: None + """ + request_info = self.to_delete_request_information( + request_configuration + ) + from ...models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + return await self.request_adapter.send_no_response_content_async(request_info, error_mapping) + + async def get(self,request_configuration: Optional[RequestConfiguration[FileStorageRequestBuilderGetQueryParameters]] = None) -> Optional[FileStorage]: + """ + Get fileStorage from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FileStorage] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ...models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...models.file_storage import FileStorage + + return await self.request_adapter.send_async(request_info, FileStorage, error_mapping) + + async def patch(self,body: FileStorage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[FileStorage]: + """ + Update the navigation property fileStorage in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[FileStorage] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ...models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ...models.file_storage import FileStorage + + return await self.request_adapter.send_async(request_info, FileStorage, error_mapping) + + def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Delete navigation property fileStorage for storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.DELETE, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[FileStorageRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get fileStorage from storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: FileStorage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update the navigation property fileStorage in storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> FileStorageRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: FileStorageRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return FileStorageRequestBuilder(self.request_adapter, raw_url) + + @property + def containers(self) -> ContainersRequestBuilder: + """ + Provides operations to manage the containers property of the microsoft.graph.fileStorage entity. + """ + from .containers.containers_request_builder import ContainersRequestBuilder + + return ContainersRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class FileStorageRequestBuilderDeleteRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FileStorageRequestBuilderGetQueryParameters(): + """ + Get fileStorage from storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class FileStorageRequestBuilderGetRequestConfiguration(RequestConfiguration[FileStorageRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class FileStorageRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/storage/storage_request_builder.py b/msgraph/generated/storage/storage_request_builder.py new file mode 100644 index 00000000000..f311d867a35 --- /dev/null +++ b/msgraph/generated/storage/storage_request_builder.py @@ -0,0 +1,161 @@ +from __future__ import annotations +from dataclasses import dataclass, field +from kiota_abstractions.base_request_builder import BaseRequestBuilder +from kiota_abstractions.base_request_configuration import RequestConfiguration +from kiota_abstractions.default_query_parameters import QueryParameters +from kiota_abstractions.get_path_parameters import get_path_parameters +from kiota_abstractions.method import Method +from kiota_abstractions.request_adapter import RequestAdapter +from kiota_abstractions.request_information import RequestInformation +from kiota_abstractions.request_option import RequestOption +from kiota_abstractions.serialization import Parsable, ParsableFactory +from typing import Any, Callable, Dict, List, Optional, TYPE_CHECKING, Union +from warnings import warn + +if TYPE_CHECKING: + from ..models.o_data_errors.o_data_error import ODataError + from ..models.storage import Storage + from .file_storage.file_storage_request_builder import FileStorageRequestBuilder + +class StorageRequestBuilder(BaseRequestBuilder): + """ + Provides operations to manage the storage singleton. + """ + def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, Dict[str, Any]]) -> None: + """ + Instantiates a new StorageRequestBuilder and sets the default values. + param path_parameters: The raw url or the url-template parameters for the request. + param request_adapter: The request adapter to use to execute the requests. + Returns: None + """ + super().__init__(request_adapter, "{+baseurl}/storage{?%24expand,%24select}", path_parameters) + + async def get(self,request_configuration: Optional[RequestConfiguration[StorageRequestBuilderGetQueryParameters]] = None) -> Optional[Storage]: + """ + Get storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Storage] + """ + request_info = self.to_get_request_information( + request_configuration + ) + from ..models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..models.storage import Storage + + return await self.request_adapter.send_async(request_info, Storage, error_mapping) + + async def patch(self,body: Storage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[Storage]: + """ + Update storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: Optional[Storage] + """ + if not body: + raise TypeError("body cannot be null.") + request_info = self.to_patch_request_information( + body, request_configuration + ) + from ..models.o_data_errors.o_data_error import ODataError + + error_mapping: Dict[str, ParsableFactory] = { + "XXX": ODataError, + } + if not self.request_adapter: + raise Exception("Http core is null") + from ..models.storage import Storage + + return await self.request_adapter.send_async(request_info, Storage, error_mapping) + + def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[StorageRequestBuilderGetQueryParameters]] = None) -> RequestInformation: + """ + Get storage + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + request_info = RequestInformation(Method.GET, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + return request_info + + def to_patch_request_information(self,body: Storage, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: + """ + Update storage + param body: The request body + param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. + Returns: RequestInformation + """ + if not body: + raise TypeError("body cannot be null.") + request_info = RequestInformation(Method.PATCH, self.url_template, self.path_parameters) + request_info.configure(request_configuration) + request_info.headers.try_add("Accept", "application/json") + request_info.set_content_from_parsable(self.request_adapter, "application/json", body) + return request_info + + def with_url(self,raw_url: str) -> StorageRequestBuilder: + """ + Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + param raw_url: The raw URL to use for the request builder. + Returns: StorageRequestBuilder + """ + if not raw_url: + raise TypeError("raw_url cannot be null.") + return StorageRequestBuilder(self.request_adapter, raw_url) + + @property + def file_storage(self) -> FileStorageRequestBuilder: + """ + Provides operations to manage the fileStorage property of the microsoft.graph.storage entity. + """ + from .file_storage.file_storage_request_builder import FileStorageRequestBuilder + + return FileStorageRequestBuilder(self.request_adapter, self.path_parameters) + + @dataclass + class StorageRequestBuilderGetQueryParameters(): + """ + Get storage + """ + def get_query_parameter(self,original_name: str) -> str: + """ + Maps the query parameters names to their encoded names for the URI template parsing. + param original_name: The original query parameter name in the class. + Returns: str + """ + if not original_name: + raise TypeError("original_name cannot be null.") + if original_name == "expand": + return "%24expand" + if original_name == "select": + return "%24select" + return original_name + + # Expand related entities + expand: Optional[List[str]] = None + + # Select properties to be returned + select: Optional[List[str]] = None + + + @dataclass + class StorageRequestBuilderGetRequestConfiguration(RequestConfiguration[StorageRequestBuilderGetQueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + @dataclass + class StorageRequestBuilderPatchRequestConfiguration(RequestConfiguration[QueryParameters]): + """ + Configuration for the request such as headers, query parameters, and middleware options. + """ + warn("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.", DeprecationWarning) + + diff --git a/msgraph/generated/teams/item/channels/item/members/item/conversation_member_item_request_builder.py b/msgraph/generated/teams/item/channels/item/members/item/conversation_member_item_request_builder.py index 2d382e3bfd0..c1235afd44f 100644 --- a/msgraph/generated/teams/item/channels/item/members/item/conversation_member_item_request_builder.py +++ b/msgraph/generated/teams/item/channels/item/members/item/conversation_member_item_request_builder.py @@ -31,10 +31,10 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def delete(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> None: """ - Delete a conversationMember from a channel. + Delete a conversationMember from a channel. This operation is allowed only for channels with a membershipType value of private or shared. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: None - Find more info here: https://learn.microsoft.com/graph/api/conversationmember-delete?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/channel-delete-members?view=graph-rest-1.0 """ request_info = self.to_delete_request_information( request_configuration @@ -71,11 +71,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Conversa async def patch(self,body: ConversationMember, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[ConversationMember]: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[ConversationMember] - Find more info here: https://learn.microsoft.com/graph/api/channel-update-members?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/conversationmember-update?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -95,7 +95,7 @@ async def patch(self,body: ConversationMember, request_configuration: Optional[R def to_delete_request_information(self,request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Delete a conversationMember from a channel. + Delete a conversationMember from a channel. This operation is allowed only for channels with a membershipType value of private or shared. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -117,7 +117,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_patch_request_information(self,body: ConversationMember, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Update the role of a conversationMember in a channel. This operation is allowed only for channels with a membershipType value of private or shared. + Update the role of a conversationMember in a team or channel. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation diff --git a/msgraph/generated/tenant_relationships/multi_tenant_organization/multi_tenant_organization_request_builder.py b/msgraph/generated/tenant_relationships/multi_tenant_organization/multi_tenant_organization_request_builder.py index 4a6bfaefb82..8d722ced712 100644 --- a/msgraph/generated/tenant_relationships/multi_tenant_organization/multi_tenant_organization_request_builder.py +++ b/msgraph/generated/tenant_relationships/multi_tenant_organization/multi_tenant_organization_request_builder.py @@ -54,11 +54,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[MultiTen async def put(self,body: MultiTenantOrganization, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[MultiTenantOrganization]: """ - Update the properties of a multitenant organization. + Create a new multitenant organization. By default, the creator tenant becomes an owner tenant upon successful creation. Only owner tenants can manage a multitenant organization. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[MultiTenantOrganization] - Find more info here: https://learn.microsoft.com/graph/api/multitenantorganization-update?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/tenantrelationship-put-multitenantorganization?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -89,7 +89,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_put_request_information(self,body: MultiTenantOrganization, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Update the properties of a multitenant organization. + Create a new multitenant organization. By default, the creator tenant becomes an owner tenant upon successful creation. Only owner tenants can manage a multitenant organization. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation diff --git a/msgraph/generated/users/item/authentication/password_methods/item/password_authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/password_methods/item/password_authentication_method_item_request_builder.py index 825e50bf691..ef9a3852783 100644 --- a/msgraph/generated/users/item/authentication/password_methods/item/password_authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/password_methods/item/password_authentication_method_item_request_builder.py @@ -31,7 +31,7 @@ def __init__(self,request_adapter: RequestAdapter, path_parameters: Union[str, D async def get(self,request_configuration: Optional[RequestConfiguration[PasswordAuthenticationMethodItemRequestBuilderGetQueryParameters]] = None) -> Optional[PasswordAuthenticationMethod]: """ - Represents the password that's registered to a user for authentication. For security, the password itself will never be returned in the object, but action can be taken to reset a password. + Represents the password registered to a user for authentication. For security, the password itself is never returned in the object, but action can be taken to reset a password. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PasswordAuthenticationMethod] """ @@ -51,7 +51,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Password def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PasswordAuthenticationMethodItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Represents the password that's registered to a user for authentication. For security, the password itself will never be returned in the object, but action can be taken to reset a password. + Represents the password registered to a user for authentication. For security, the password itself is never returned in the object, but action can be taken to reset a password. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -73,7 +73,7 @@ def with_url(self,raw_url: str) -> PasswordAuthenticationMethodItemRequestBuilde @dataclass class PasswordAuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - Represents the password that's registered to a user for authentication. For security, the password itself will never be returned in the object, but action can be taken to reset a password. + Represents the password registered to a user for authentication. For security, the password itself is never returned in the object, but action can be taken to reset a password. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/users/item/authentication/password_methods/password_methods_request_builder.py b/msgraph/generated/users/item/authentication/password_methods/password_methods_request_builder.py index 96add0379de..5c492020f7d 100644 --- a/msgraph/generated/users/item/authentication/password_methods/password_methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/password_methods/password_methods_request_builder.py @@ -48,7 +48,7 @@ def by_password_authentication_method_id(self,password_authentication_method_id: async def get(self,request_configuration: Optional[RequestConfiguration[PasswordMethodsRequestBuilderGetQueryParameters]] = None) -> Optional[PasswordAuthenticationMethodCollectionResponse]: """ - Represents the password that's registered to a user for authentication. For security, the password itself will never be returned in the object, but action can be taken to reset a password. + Represents the password registered to a user for authentication. For security, the password itself is never returned in the object, but action can be taken to reset a password. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[PasswordAuthenticationMethodCollectionResponse] """ @@ -91,7 +91,7 @@ async def post(self,body: PasswordAuthenticationMethod, request_configuration: O def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[PasswordMethodsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Represents the password that's registered to a user for authentication. For security, the password itself will never be returned in the object, but action can be taken to reset a password. + Represents the password registered to a user for authentication. For security, the password itself is never returned in the object, but action can be taken to reset a password. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -137,7 +137,7 @@ def count(self) -> CountRequestBuilder: @dataclass class PasswordMethodsRequestBuilderGetQueryParameters(): """ - Represents the password that's registered to a user for authentication. For security, the password itself will never be returned in the object, but action can be taken to reset a password. + Represents the password registered to a user for authentication. For security, the password itself is never returned in the object, but action can be taken to reset a password. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/users/item/authentication/software_oath_methods/item/software_oath_authentication_method_item_request_builder.py b/msgraph/generated/users/item/authentication/software_oath_methods/item/software_oath_authentication_method_item_request_builder.py index 480693e7c09..c1276be8c33 100644 --- a/msgraph/generated/users/item/authentication/software_oath_methods/item/software_oath_authentication_method_item_request_builder.py +++ b/msgraph/generated/users/item/authentication/software_oath_methods/item/software_oath_authentication_method_item_request_builder.py @@ -50,7 +50,7 @@ async def delete(self,request_configuration: Optional[RequestConfiguration[Query async def get(self,request_configuration: Optional[RequestConfiguration[SoftwareOathAuthenticationMethodItemRequestBuilderGetQueryParameters]] = None) -> Optional[SoftwareOathAuthenticationMethod]: """ - The software OATH TOTP applications registered to a user for authentication. + The software OATH time-based one-time password (TOTP) applications registered to a user for authentication. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SoftwareOathAuthenticationMethod] """ @@ -81,7 +81,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SoftwareOathAuthenticationMethodItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - The software OATH TOTP applications registered to a user for authentication. + The software OATH time-based one-time password (TOTP) applications registered to a user for authentication. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -110,7 +110,7 @@ class SoftwareOathAuthenticationMethodItemRequestBuilderDeleteRequestConfigurati @dataclass class SoftwareOathAuthenticationMethodItemRequestBuilderGetQueryParameters(): """ - The software OATH TOTP applications registered to a user for authentication. + The software OATH time-based one-time password (TOTP) applications registered to a user for authentication. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/users/item/authentication/software_oath_methods/software_oath_methods_request_builder.py b/msgraph/generated/users/item/authentication/software_oath_methods/software_oath_methods_request_builder.py index 9348b5f2fb3..57de51c6e73 100644 --- a/msgraph/generated/users/item/authentication/software_oath_methods/software_oath_methods_request_builder.py +++ b/msgraph/generated/users/item/authentication/software_oath_methods/software_oath_methods_request_builder.py @@ -47,7 +47,7 @@ def by_software_oath_authentication_method_id(self,software_oath_authentication_ async def get(self,request_configuration: Optional[RequestConfiguration[SoftwareOathMethodsRequestBuilderGetQueryParameters]] = None) -> Optional[SoftwareOathAuthenticationMethodCollectionResponse]: """ - The software OATH TOTP applications registered to a user for authentication. + The software OATH time-based one-time password (TOTP) applications registered to a user for authentication. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[SoftwareOathAuthenticationMethodCollectionResponse] """ @@ -67,7 +67,7 @@ async def get(self,request_configuration: Optional[RequestConfiguration[Software def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[SoftwareOathMethodsRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - The software OATH TOTP applications registered to a user for authentication. + The software OATH time-based one-time password (TOTP) applications registered to a user for authentication. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -98,7 +98,7 @@ def count(self) -> CountRequestBuilder: @dataclass class SoftwareOathMethodsRequestBuilderGetQueryParameters(): """ - The software OATH TOTP applications registered to a user for authentication. + The software OATH time-based one-time password (TOTP) applications registered to a user for authentication. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/users/item/user_item_request_builder.py b/msgraph/generated/users/item/user_item_request_builder.py index da5f10fa5b2..85478ddb002 100644 --- a/msgraph/generated/users/item/user_item_request_builder.py +++ b/msgraph/generated/users/item/user_item_request_builder.py @@ -140,10 +140,10 @@ def export_device_and_app_management_data_with_skip_with_top(self,skip: int, top async def get(self,request_configuration: Optional[RequestConfiguration[UserItemRequestBuilderGetQueryParameters]] = None) -> Optional[User]: """ - Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details. + Read properties and relationships of the user object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] - Find more info here: https://learn.microsoft.com/graph/api/user-get?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/intune-mam-user-get?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -211,7 +211,7 @@ def to_delete_request_information(self,request_configuration: Optional[RequestCo def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[UserItemRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details. + Read properties and relationships of the user object. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -912,7 +912,7 @@ class UserItemRequestBuilderDeleteRequestConfiguration(RequestConfiguration[Quer @dataclass class UserItemRequestBuilderGetQueryParameters(): """ - Retrieve the properties and relationships of user object. This operation returns by default only a subset of the more commonly used properties for each user. These default properties are noted in the Properties section. To get properties that are not returned by default, do a GET operation for the user and specify the properties in a $select OData query option. Because the user resource supports extensions, you can also use the GET operation to get custom properties and extension data in a user instance. Customers through Microsoft Entra ID for customers can also use this API operation to retrieve their details. + Read properties and relationships of the user object. """ def get_query_parameter(self,original_name: str) -> str: """ diff --git a/msgraph/generated/users/users_request_builder.py b/msgraph/generated/users/users_request_builder.py index 2137fd8c205..ad2697a2479 100644 --- a/msgraph/generated/users/users_request_builder.py +++ b/msgraph/generated/users/users_request_builder.py @@ -52,10 +52,10 @@ def by_user_id(self,user_id: str) -> UserItemRequestBuilder: async def get(self,request_configuration: Optional[RequestConfiguration[UsersRequestBuilderGetQueryParameters]] = None) -> Optional[UserCollectionResponse]: """ - List properties and relationships of the user objects. + Retrieve a list of user objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[UserCollectionResponse] - Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-user-list?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/user-list?view=graph-rest-1.0 """ request_info = self.to_get_request_information( request_configuration @@ -73,11 +73,11 @@ async def get(self,request_configuration: Optional[RequestConfiguration[UsersReq async def post(self,body: User, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> Optional[User]: """ - Create a new user object. + Create a new user.The request body contains the user to create. At a minimum, you must specify the required properties for the user. You can optionally specify any other writable properties. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: Optional[User] - Find more info here: https://learn.microsoft.com/graph/api/intune-onboarding-user-create?view=graph-rest-1.0 + Find more info here: https://learn.microsoft.com/graph/api/user-post-users?view=graph-rest-1.0 """ if not body: raise TypeError("body cannot be null.") @@ -97,7 +97,7 @@ async def post(self,body: User, request_configuration: Optional[RequestConfigura def to_get_request_information(self,request_configuration: Optional[RequestConfiguration[UsersRequestBuilderGetQueryParameters]] = None) -> RequestInformation: """ - List properties and relationships of the user objects. + Retrieve a list of user objects. param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation """ @@ -108,7 +108,7 @@ def to_get_request_information(self,request_configuration: Optional[RequestConfi def to_post_request_information(self,body: User, request_configuration: Optional[RequestConfiguration[QueryParameters]] = None) -> RequestInformation: """ - Create a new user object. + Create a new user.The request body contains the user to create. At a minimum, you must specify the required properties for the user. You can optionally specify any other writable properties. param body: The request body param request_configuration: Configuration for the request such as headers, query parameters, and middleware options. Returns: RequestInformation @@ -179,7 +179,7 @@ def validate_properties(self) -> ValidatePropertiesRequestBuilder: @dataclass class UsersRequestBuilderGetQueryParameters(): """ - List properties and relationships of the user objects. + Retrieve a list of user objects. """ def get_query_parameter(self,original_name: str) -> str: """